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()
83
83
$ this ->assertInstanceOf (Breadcrumbs::class, $ helper );
84
84
$ this ->assertSame ($ services , $ helper ->getServiceLocator ());
85
85
}
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
+ }
86
106
}
Original file line number Diff line number Diff line change @@ -89,4 +89,24 @@ public function testInstanceOfMatches()
89
89
{
90
90
$ this ->markTestSkipped ('instanceOf is not used with this implementation ' );
91
91
}
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
+ }
92
112
}
You can’t perform that action at this time.
0 commit comments