22namespace Tests ;
33
44use Bigcommerce \Injector \InjectorInterface ;
5- use Bigcommerce \TestInjector \MockingContainer ;
6- use Bigcommerce \TestInjector \ TestInjector ;
5+ use Bigcommerce \MockInjector \MockingContainer ;
6+ use Bigcommerce \MockInjector \ MockInjector ;
77use Prophecy \Prophecy \ObjectProphecy ;
88use Tests \Dummy \DummyDependency ;
99use Tests \Dummy \DummySubDependency ;
1010
1111/**
1212 *
13- * @coversDefaultClass \Bigcommerce\TestInjector \TestInjector
13+ * @coversDefaultClass \Bigcommerce\MockInjector \TestInjector
1414 */
1515class TestInjectorTest extends \PHPUnit_Framework_TestCase
1616{
@@ -32,7 +32,7 @@ protected function setUp()
3232 public function testCreate ()
3333 {
3434 $ this ->injector ->create ("abc123 " , [1 => "hello " ])->willReturn ("cat " )->shouldBeCalledTimes (1 );
35- $ i = new TestInjector ($ this ->mockContainer ->reveal (), $ this ->injector ->reveal ());
35+ $ i = new MockInjector ($ this ->mockContainer ->reveal (), $ this ->injector ->reveal ());
3636 $ this ->assertEquals ("cat " , $ i ->create ("abc123 " , [1 => "hello " ]));
3737 }
3838
@@ -43,7 +43,7 @@ public function testInvoke()
4343 {
4444 $ obj = new \stdClass ();
4545 $ this ->injector ->invoke ($ obj , "method1 " , [1 => "hello " ])->willReturn ("fish " )->shouldBeCalledTimes (1 );
46- $ i = new TestInjector ($ this ->mockContainer ->reveal (), $ this ->injector ->reveal ());
46+ $ i = new MockInjector ($ this ->mockContainer ->reveal (), $ this ->injector ->reveal ());
4747 $ this ->assertEquals ("fish " , $ i ->invoke ($ obj , "method1 " , [1 => "hello " ]));
4848 }
4949
@@ -53,7 +53,7 @@ public function testInvoke()
5353 public function testCheckPredictions ()
5454 {
5555 $ this ->mockContainer ->checkPredictions ()->shouldBeCalledTimes (1 );
56- $ i = new TestInjector ($ this ->mockContainer ->reveal (), $ this ->injector ->reveal ());
56+ $ i = new MockInjector ($ this ->mockContainer ->reveal (), $ this ->injector ->reveal ());
5757 $ i ->checkPredictions ();
5858 }
5959
@@ -63,7 +63,7 @@ public function testCheckPredictions()
6363 public function testGetAllMocks ()
6464 {
6565 $ this ->mockContainer ->getAllMocks ()->willReturn ([1 , 2 , 6 ])->shouldBeCalledTimes (1 );
66- $ i = new TestInjector ($ this ->mockContainer ->reveal (), $ this ->injector ->reveal ());
66+ $ i = new MockInjector ($ this ->mockContainer ->reveal (), $ this ->injector ->reveal ());
6767 $ this ->assertEquals ([1 , 2 , 6 ], $ i ->getAllMocks ());
6868 }
6969
@@ -74,7 +74,7 @@ public function testGetMock()
7474 {
7575 $ dummy = new \stdClass ();
7676 $ this ->mockContainer ->getMock ("blah " )->willReturn ($ dummy )->shouldBeCalledTimes (1 );
77- $ i = new TestInjector ($ this ->mockContainer ->reveal (), $ this ->injector ->reveal ());
77+ $ i = new MockInjector ($ this ->mockContainer ->reveal (), $ this ->injector ->reveal ());
7878 $ this ->assertEquals ($ dummy , $ i ->getMock ("blah " ));
7979 }
8080
@@ -85,7 +85,7 @@ public function testGetMock()
8585 */
8686 public function testWithoutDependencies ()
8787 {
88- $ i = new TestInjector ();
88+ $ i = new MockInjector ();
8989 /** @var DummyDependency $obj */
9090 $ obj = $ i ->create (DummyDependency::class);
9191 $ this ->assertInstanceOf (DummySubDependency::class, $ obj ->getDependency ());
0 commit comments