Changeset View
Changeset View
Standalone View
Standalone View
src/parser/html/__tests__/PhutilHTMLParserTestCase.php
<?php | <?php | ||||
final class PhutilHTMLParserTestCase | final class PhutilHTMLParserTestCase | ||||
extends PhutilTestCase { | extends PhutilTestCase { | ||||
public function testHTMLParser() { | public function testHTMLParser() { | ||||
$root = dirname(__FILE__).'/data/'; | $root = __DIR__.'/data/'; | ||||
$tests = Filesystem::listDirectory($root, $include_hidden = false); | $tests = Filesystem::listDirectory($root, $include_hidden = false); | ||||
foreach ($tests as $test) { | foreach ($tests as $test) { | ||||
$path = $root.$test; | $path = $root.$test; | ||||
$data = Filesystem::readFile($path); | $data = Filesystem::readFile($path); | ||||
$parts = explode("\n~~~~~~~~~~\n", $data); | $parts = explode("\n~~~~~~~~~~\n", $data); | ||||
if (count($parts) !== 2) { | if (count($parts) !== 2) { | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0