3232 * @version $Revision$
3333 */
3434
35- require_once dirname ( __FILE__ ) . '/DoctrineTest/UnitTestCase.php ' ;
36- require_once dirname ( __FILE__ ) . '/DoctrineTest/GroupTest.php ' ;
37- require_once dirname ( __FILE__ ) . '/DoctrineTest/Doctrine_UnitTestCase.php ' ;
38- require_once dirname ( __FILE__ ) . '/DoctrineTest/Reporter.php ' ;
35+ require_once __DIR__ . '/DoctrineTest/UnitTestCase.php ' ;
36+ require_once __DIR__ . '/DoctrineTest/GroupTest.php ' ;
37+ require_once __DIR__ . '/DoctrineTest/Doctrine_UnitTestCase.php ' ;
38+ require_once __DIR__ . '/DoctrineTest/Reporter.php ' ;
3939
4040class DoctrineTest
4141{
@@ -75,13 +75,13 @@ public function run()
7575 {
7676 $ testGroup = $ this ->testGroup ;
7777 if (PHP_SAPI === 'cli ' ) {
78- require_once (dirname ( __FILE__ ) . '/DoctrineTest/Reporter/Cli.php ' );
78+ require_once (__DIR__ . '/DoctrineTest/Reporter/Cli.php ' );
7979 $ reporter = new DoctrineTest_Reporter_Cli ();
8080 $ argv = $ _SERVER ['argv ' ];
8181 array_shift ($ argv );
8282 $ options = $ this ->parseOptions ($ argv );
8383 } else {
84- require_once (dirname ( __FILE__ ) . '/DoctrineTest/Reporter/Html.php ' );
84+ require_once (__DIR__ . '/DoctrineTest/Reporter/Html.php ' );
8585 $ options = $ _GET ;
8686 if (isset ($ options ['filter ' ])) {
8787 if ( ! is_array ($ options ['filter ' ])) {
@@ -148,7 +148,7 @@ public function run()
148148 * somebody could give it a try. Just replace this block of code
149149 * with the one below
150150 *
151- define('PHPCOVERAGE_HOME', dirname(dirname(__FILE__) ) . '/vendor/spikephpcoverage');
151+ define('PHPCOVERAGE_HOME', dirname(__DIR__ ) . '/vendor/spikephpcoverage');
152152 require_once PHPCOVERAGE_HOME . '/CoverageRecorder.php';
153153 require_once PHPCOVERAGE_HOME . '/reporter/HtmlCoverageReporter.php';
154154
@@ -170,8 +170,8 @@ public function run()
170170 $ ret = $ testGroup ->run ($ reporter , $ filter );
171171 $ result ['coverage ' ] = xdebug_get_code_coverage ();
172172 xdebug_stop_code_coverage ();
173- file_put_contents (dirname ( __FILE__ ) . '/coverage/coverage.txt ' , serialize ($ result ));
174- require_once dirname ( __FILE__ ) . '/DoctrineTest/Coverage.php ' ;
173+ file_put_contents (__DIR__ . '/coverage/coverage.txt ' , serialize ($ result ));
174+ require_once __DIR__ . '/DoctrineTest/Coverage.php ' ;
175175 $ coverageGeneration = new DoctrineTest_Coverage ();
176176 $ coverageGeneration ->generateReport ();
177177 return $ ret ;
@@ -203,7 +203,7 @@ public function run()
203203 */
204204 public function requireModels ()
205205 {
206- $ models = new DirectoryIterator (dirname ( __FILE__ ) . '/models/ ' );
206+ $ models = new DirectoryIterator (__DIR__ . '/models/ ' );
207207
208208 foreach ($ models as $ key => $ file ) {
209209 if ($ file ->isFile () && ! $ file ->isDot ()) {
0 commit comments