You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,9 @@ Use **addSkipDirectory** to add simple case insensitive file matching to skip sp
49
49
## Autoloading
50
50
You must make sure autoloading is correctly configured for all classes. This means you can't pass references to classes that will not resolve correctly in your source. Use **addSkipDirectory** if you have test code that may not validate correctly.
51
51
52
+
## Namespace Testing
53
+
The **assertValidPHPFile** and **assertValidPHPDirectory** asserts will test for the proper namespace in the file path (for PSR-0 autoloading and fully pathed PSR-4 autoloading), but you can turn off namespace testing with **skipNamespaceTesting** or exclude a specific namespace tests with **addSkipNamespace**.
54
+
52
55
## PHP Version
53
56
While this library only supports PHP 7.1 or higher, you can create a project and point it to PHP 5.2 or higher. The default is to prefer PHP 7 code, but to prefer or only parse PHP 5, configure phpunit.xml(.dist) with
Copy file name to clipboardExpand all lines: tests/UnitTest.php
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@
11
11
*/
12
12
class UnitTest extends \PHPFUI\PHPUnitSyntaxCoverage\Extensions
13
13
{
14
-
15
14
publicfunctiontestDirectory() : void
16
15
{
17
16
$this->assertValidPHPDirectory(__DIR__, 'Test directory is not valid', false);
@@ -46,7 +45,12 @@ public function testValidPHPFile() : void
46
45
47
46
publicfunctiontestVendorDirectory() : void
48
47
{
48
+
$this->skipNamespaceTesting();
49
+
// Sloppy coding from various packages causes us to have to skip directories. If only they used PHPUnitSyntaxCoverage they would have detected these issues!
0 commit comments