Changeset View
Changeset View
Standalone View
Standalone View
src/parser/xhpast/api/__tests__/XHPASTNodeTestCase.php
Show All 22 Lines | private function assertStringVariables($expected, $string) { | ||||
$statement = XHPASTTree::newStatementFromString($string); | $statement = XHPASTTree::newStatementFromString($string); | ||||
$this->assertEqual( | $this->assertEqual( | ||||
$expected, | $expected, | ||||
$statement->getChildByIndex(0)->getStringVariables(), | $statement->getChildByIndex(0)->getStringVariables(), | ||||
$string); | $string); | ||||
} | } | ||||
public function testGetNamespace() { | public function testGetNamespace() { | ||||
$dir = dirname(__FILE__).'/namespace/'; | $dir = __DIR__.'/namespace/'; | ||||
$files = id(new FileFinder($dir)) | $files = id(new FileFinder($dir)) | ||||
->withType('f') | ->withType('f') | ||||
->withSuffix('php.test') | ->withSuffix('php.test') | ||||
->find(); | ->find(); | ||||
foreach ($files as $file) { | foreach ($files as $file) { | ||||
list($tree, $expect) = $this->readTestData($dir.'/'.$file); | list($tree, $expect) = $this->readTestData($dir.'/'.$file); | ||||
▲ Show 20 Lines • Show All 62 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