Skip to content

Commit e2249ae

Browse files
committed
Fix unit tests since exception is no longer thrown
1 parent b1b3eb4 commit e2249ae

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

tests/SectionTest.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
*/
1212
class SectionTest extends \PHPFUI\HTMLUnitTester\Extensions
1313
{
14-
1514
private $sections = [];
15+
1616
private $fileManager;
17+
1718
private $controller;
1819

1920
/**
@@ -31,13 +32,13 @@ public function setUp() : void
3132
{
3233
if (! $fileInfo->isDir())
3334
{
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))
3738
{
3839
// leave part on floor, not needed
3940
}
40-
$this->sections[] = implode('\\', $parts);
41+
$this->sections[] = \implode('\\', $parts);
4142
}
4243
}
4344

@@ -99,11 +100,9 @@ public function testHomePage() : void
99100

100101
public function testInvalidPage() : void
101102
{
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'));
104104
$page = $this->controller->display(\PHPFUI\InstaDoc\Controller::VALID_CLASS_PAGES, $this->controller->getPage());
105105
$this->assertValidHtml("{$page}");
106-
$this->assertNotWarningHtml("{$page}");
107106
}
108107

109108
public function testTestClass() : void
@@ -120,6 +119,4 @@ public function testTestClass() : void
120119
}
121120
}
122121
}
123-
124122
}
125-

0 commit comments

Comments
 (0)