Changeset 20690
- Timestamp:
- 08/02/09 13:41:12 (4 years ago)
- Files:
-
- tools/lime/branches/2.0-experimental/lib/LimeAnnotationSupport.php (modified) (1 diff)
- tools/lime/branches/2.0-experimental/test/unit/LimeAnnotationSupport/test_include.inc.php (added)
- tools/lime/branches/2.0-experimental/test/unit/LimeAnnotationSupport/test_include.php (added)
- tools/lime/branches/2.0-experimental/test/unit/LimeAnnotationSupportTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/lime/branches/2.0-experimental/lib/LimeAnnotationSupport.php
r20493 r20690 106 106 protected static function getScriptPath() 107 107 { 108 $script = null;109 110 108 $traces = debug_backtrace(); 111 $file = __FILE__; 112 113 for ($i = 0; $i < count($traces) && $file == __FILE__; ++$i) 114 { 115 $file = $traces[$i]['file']; 116 } 109 $file = $traces[count($traces)-1]['file']; 117 110 118 111 if (!is_file($file)) tools/lime/branches/2.0-experimental/test/unit/LimeAnnotationSupportTest.php
r20495 r20690 22 22 23 23 24 $t = new LimeAnnotationSupportTest(3 7);24 $t = new LimeAnnotationSupportTest(39); 25 25 26 26 $root = '/test/unit/LimeAnnotationSupport'; … … 416 416 $t->is($result, 0, 'The file returned exit status 0 (success)'); 417 417 $t->isOutput($actual, $expected); 418 419 420 $t->diag('The annotation support can be enabled in included bootstrap files'); 421 422 // test 423 list($result, $actual) = execute($file = 'test_include.php'); 424 // assertion 425 $expected = <<<EOF 426 $root/@$file 427 1..0 428 Before 429 Test 1 430 Before 431 Test 2 432 Looks like everything went fine. 433 EOF; 434 $t->is($result, 0, 'The file returned exit status 0 (success)'); 435 $t->isOutput($actual, $expected);