11
11
*/
12
12
class SectionTest extends \PHPFUI \HTMLUnitTester \Extensions
13
13
{
14
-
15
14
private $ sections = [];
15
+
16
16
private $ fileManager ;
17
+
17
18
private $ controller ;
18
19
19
20
/**
@@ -31,13 +32,13 @@ public function setUp() : void
31
32
{
32
33
if (! $ fileInfo ->isDir ())
33
34
{
34
- $ path = str_replace ('/ ' , '\\' , str_replace ('.php ' , '' , $ filename ));
35
- $ parts = explode ('\\' , $ path );
36
- while (count ($ parts ) && array_shift ($ parts ) != ' src ' )
35
+ $ path = \ str_replace ('/ ' , '\\' , \ str_replace ('.php ' , '' , $ filename ));
36
+ $ parts = \ explode ('\\' , $ path );
37
+ while (\ count ($ parts ) && ' src ' != \ array_shift ($ parts ))
37
38
{
38
39
// leave part on floor, not needed
39
40
}
40
- $ this ->sections [] = implode ('\\' , $ parts );
41
+ $ this ->sections [] = \ implode ('\\' , $ parts );
41
42
}
42
43
}
43
44
@@ -99,11 +100,9 @@ public function testHomePage() : void
99
100
100
101
public function testInvalidPage () : void
101
102
{
102
- $ this ->expectException (\ReflectionException::class);
103
- $ this ->controller ->setParameters ($ this ->controller ->getClassParts ('\\Fred \\Flintstone \\Bedrock ' ));
103
+ $ this ->controller ->setParameters ($ this ->controller ->getClassParts ('\\Fred \\Flintstone \\Bedrock ' ));
104
104
$ page = $ this ->controller ->display (\PHPFUI \InstaDoc \Controller::VALID_CLASS_PAGES , $ this ->controller ->getPage ());
105
105
$ this ->assertValidHtml ("{$ page }" );
106
- $ this ->assertNotWarningHtml ("{$ page }" );
107
106
}
108
107
109
108
public function testTestClass () : void
@@ -120,6 +119,4 @@ public function testTestClass() : void
120
119
}
121
120
}
122
121
}
123
-
124
122
}
125
-
0 commit comments