Changeset View
Changeset View
Standalone View
Standalone View
src/lexer/__tests__/PhutilPHPFragmentLexerTestCase.php
<?php | <?php | ||||
final class PhutilPHPFragmentLexerTestCase extends PhutilTestCase { | final class PhutilPHPFragmentLexerTestCase extends PhutilTestCase { | ||||
public function testPHPFragmentLexer() { | public function testPHPFragmentLexer() { | ||||
$dir = dirname(__FILE__).'/php'; | $dir = __DIR__.'/php'; | ||||
foreach (Filesystem::listDirectory($dir, $hidden = false) as $file) { | foreach (Filesystem::listDirectory($dir, $hidden = false) as $file) { | ||||
$data = Filesystem::readFile($dir.'/'.$file); | $data = Filesystem::readFile($dir.'/'.$file); | ||||
$this->runLexer($file, $data); | $this->runLexer($file, $data); | ||||
} | } | ||||
} | } | ||||
private function runLexer($file, $data) { | private function runLexer($file, $data) { | ||||
$lexer = new PhutilPHPFragmentLexer(); | $lexer = new PhutilPHPFragmentLexer(); | ||||
▲ Show 20 Lines • Show All 303 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