|
18 | 18 | */
|
19 | 19 | class FileReflectionTest extends \PHPUnit_Framework_TestCase
|
20 | 20 | {
|
21 |
| - public function testFileConstructor() |
22 |
| - { |
23 |
| - $filePath = __DIR__ . '/../../vendor/zendframework/zend-version/src/Version.php'; |
24 |
| - require_once $filePath; |
25 |
| - $reflectionFile = new FileReflection($filePath); |
26 |
| - $this->assertEquals(get_class($reflectionFile), 'Zend\Code\Reflection\FileReflection'); |
27 |
| - } |
28 |
| - |
29 | 21 | public function testFileConstructorThrowsExceptionOnNonExistentFile()
|
30 | 22 | {
|
31 | 23 | $nonExistentFile = 'Non/Existent/File.php';
|
@@ -108,19 +100,15 @@ public function testFileReflectorRequiredFunctionsDoNothing()
|
108 | 100 | {
|
109 | 101 | $this->assertNull(FileReflection::export());
|
110 | 102 |
|
111 |
| - $filePath = __DIR__ . '/../../vendor/zendframework/zend-version/src/Version.php'; |
112 |
| - require_once $filePath; |
113 |
| - $reflectionFile = new FileReflection($filePath); |
| 103 | + $reflectionFile = new FileReflection(__FILE__); |
114 | 104 | $this->assertEquals('', $reflectionFile->__toString());
|
115 | 105 | }
|
116 | 106 |
|
117 | 107 | public function testFileGetFilenameReturnsCorrectFilename()
|
118 | 108 | {
|
119 |
| - $filePath = __DIR__ . '/../../vendor/zendframework/zend-version/src/Version.php'; |
120 |
| - require_once $filePath; |
121 |
| - $reflectionFile = new FileReflection($filePath); |
| 109 | + $reflectionFile = new FileReflection(__FILE__); |
122 | 110 |
|
123 |
| - $this->assertEquals('Version.php', $reflectionFile->getFileName()); |
| 111 | + $this->assertEquals('FileReflectionTest.php', $reflectionFile->getFileName()); |
124 | 112 | }
|
125 | 113 |
|
126 | 114 | public function testFileGetLineNumbersWorks()
|
|
0 commit comments