replace __DIR__ with dirname(__FILE__)

This commit is contained in:
scribu
2012-03-17 23:05:52 -07:00
committed by Justin Hileman
parent bec9ce8448
commit 550da21455
8 changed files with 22 additions and 22 deletions
@@ -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();
}