This repository was archived by the owner on Jan 31, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments