@@ -29,7 +29,6 @@ class IlluminateRegistryTest extends PHPUnit_Framework_TestCase
2929 protected function setUp ()
3030 {
3131 $ this ->container = m::mock (Container::class);
32- $ this ->container ->shouldReceive ('bound ' )->andReturn (false );
3332 $ this ->factory = m::mock (EntityManagerFactory::class);
3433
3534 $ this ->registry = new IlluminateRegistry (
@@ -40,7 +39,7 @@ protected function setUp()
4039
4140 public function test_can_add_manager ()
4241 {
43- $ this ->container ->shouldReceive ('singleton ' )->once ();
42+ $ this ->container ->shouldReceive ('singleton ' )->twice ();
4443 $ this ->registry ->addManager ('default ' , ['settings ' ]);
4544
4645 $ this ->assertTrue ($ this ->registry ->managerExists ('default ' ));
@@ -70,7 +69,7 @@ public function test_get_default_connection_name()
7069 public function test_get_default_manager_name ()
7170 {
7271 // Will return first, when no default name
73- $ this ->container ->shouldReceive ('singleton ' )->once ( );
72+ $ this ->container ->shouldReceive ('singleton ' )->times ( 3 );
7473 $ this ->registry ->addManager ('custom ' );
7574 $ this ->assertEquals ('custom ' , $ this ->registry ->getDefaultManagerName ());
7675
@@ -178,7 +177,7 @@ public function test_can_get_all_connections()
178177
179178 public function test_can_get_default_manager ()
180179 {
181- $ this ->container ->shouldReceive ('singleton ' )->once ( );
180+ $ this ->container ->shouldReceive ('singleton ' )->times ( 2 );
182181 $ this ->registry ->addManager ('default ' );
183182
184183 $ this ->container ->shouldReceive ('make ' )
@@ -191,7 +190,7 @@ public function test_can_get_default_manager()
191190
192191 public function test_can_get_custom_manager ()
193192 {
194- $ this ->container ->shouldReceive ('singleton ' )->once ( );
193+ $ this ->container ->shouldReceive ('singleton ' )->times ( 2 );
195194 $ this ->registry ->addManager ('custom ' );
196195
197196 $ this ->container ->shouldReceive ('make ' )
@@ -213,7 +212,7 @@ public function test_cannot_non_existing_manager()
213212
214213 public function test_manager_gets_only_resolved_once ()
215214 {
216- $ this ->container ->shouldReceive ('singleton ' )->once ( );
215+ $ this ->container ->shouldReceive ('singleton ' )->times ( 2 );
217216 $ this ->registry ->addManager ('default ' );
218217
219218 $ this ->container ->shouldReceive ('make ' )
@@ -231,7 +230,7 @@ public function test_manager_gets_only_resolved_once()
231230
232231 public function test_can_check_if_manager_exists ()
233232 {
234- $ this ->container ->shouldReceive ('singleton ' )->once ( );
233+ $ this ->container ->shouldReceive ('singleton ' )->times ( 2 );
235234 $ this ->registry ->addManager ('default ' );
236235
237236 $ this ->assertFalse ($ this ->registry ->managerExists ('non-existing ' ));
@@ -240,7 +239,7 @@ public function test_can_check_if_manager_exists()
240239
241240 public function test_can_get_manager_names ()
242241 {
243- $ this ->container ->shouldReceive ('singleton ' )->twice ( );
242+ $ this ->container ->shouldReceive ('singleton ' )->times ( 4 );
244243
245244 $ this ->registry ->addManager ('default ' );
246245 $ this ->registry ->addManager ('custom ' );
@@ -252,7 +251,7 @@ public function test_can_get_manager_names()
252251
253252 public function test_can_get_all_managers ()
254253 {
255- $ this ->container ->shouldReceive ('singleton ' )->twice ( );
254+ $ this ->container ->shouldReceive ('singleton ' )->times ( 4 );
256255
257256 $ this ->container ->shouldReceive ('make ' )
258257 ->with ('doctrine.managers.default ' )
@@ -302,7 +301,7 @@ public function test_cannot_reset_non_existing_managers()
302301 $ this ->registry ->resetManager ('non-existing ' );
303302 }
304303
305- public function test_get_alias_namespace_from_unkown_namespace ()
304+ public function test_get_alias_namespace_from_unknown_namespace ()
306305 {
307306 $ this ->setExpectedException (
308307 ORMException::class,
0 commit comments