replace __DIR__ with dirname(__FILE__)
This commit is contained in:
@@ -46,7 +46,7 @@ class Mustache_Test_Functional_ExamplesTest extends PHPUnit_Framework_TestCase {
|
||||
* @return array
|
||||
*/
|
||||
public function getExamples() {
|
||||
$path = realpath(__DIR__.'/../../../../examples');
|
||||
$path = realpath(dirname(__FILE__).'/../../../../examples');
|
||||
$examples = array();
|
||||
|
||||
$handle = opendir($path);
|
||||
|
||||
@@ -28,7 +28,7 @@ class Mustache_Test_Functional_MustacheSpecTest extends PHPUnit_Framework_TestCa
|
||||
* simply to provide a 'skipped' test if the `spec` submodule isn't initialized.
|
||||
*/
|
||||
public function testSpecInitialized() {
|
||||
if (!file_exists(__DIR__.'/../../../../vendor/spec/specs/')) {
|
||||
if (!file_exists(dirname(__FILE__).'/../../../../vendor/spec/specs/')) {
|
||||
$this->markTestSkipped('Mustache spec submodule not initialized: run "git submodule update --init"');
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ class Mustache_Test_Functional_MustacheSpecTest extends PHPUnit_Framework_TestCa
|
||||
* @return array
|
||||
*/
|
||||
private function loadSpec($name) {
|
||||
$filename = __DIR__ . '/../../../../vendor/spec/specs/' . $name . '.yml';
|
||||
$filename = dirname(__FILE__) . '/../../../../vendor/spec/specs/' . $name . '.yml';
|
||||
if (!file_exists($filename)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user