Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 911d88f

Browse files
committed
Merge branch 'hotfix/qa-tools'
Close #113
2 parents e94e1eb + 8d50698 commit 911d88f

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

test/Helper/Navigation/PluginManagerCompatibilityTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,24 @@ public function testInjectsParentContainerIntoHelpers()
8383
$this->assertInstanceOf(Breadcrumbs::class, $helper);
8484
$this->assertSame($services, $helper->getServiceLocator());
8585
}
86+
87+
/**
88+
* @todo Remove when package has upgraded to PHPUnit 5.7/6.0 series.
89+
*/
90+
public function testRegisteringInvalidElementRaisesException()
91+
{
92+
$this->setExpectedException($this->getServiceNotFoundException());
93+
$this->getPluginManager()->setService('test', $this);
94+
}
95+
96+
/**
97+
* @todo Remove when package has upgraded to PHPUnit 5.7/6.0 series.
98+
*/
99+
public function testLoadingInvalidElementRaisesException()
100+
{
101+
$manager = $this->getPluginManager();
102+
$manager->setInvokableClass('test', get_class($this));
103+
$this->setExpectedException($this->getServiceNotFoundException());
104+
$manager->get('test');
105+
}
86106
}

test/HelperPluginManagerCompatibilityTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,24 @@ public function testInstanceOfMatches()
8989
{
9090
$this->markTestSkipped('instanceOf is not used with this implementation');
9191
}
92+
93+
/**
94+
* @todo Remove when package has upgraded to PHPUnit 5.7/6.0 series.
95+
*/
96+
public function testRegisteringInvalidElementRaisesException()
97+
{
98+
$this->setExpectedException($this->getServiceNotFoundException());
99+
$this->getPluginManager()->setService('test', $this);
100+
}
101+
102+
/**
103+
* @todo Remove when package has upgraded to PHPUnit 5.7/6.0 series.
104+
*/
105+
public function testLoadingInvalidElementRaisesException()
106+
{
107+
$manager = $this->getPluginManager();
108+
$manager->setInvokableClass('test', get_class($this));
109+
$this->setExpectedException($this->getServiceNotFoundException());
110+
$manager->get('test');
111+
}
92112
}

0 commit comments

Comments
 (0)