From 43f04b2d7ae2fed6f8b466cd12362c615353f18b Mon Sep 17 00:00:00 2001 From: MrQin <18748406022@163.com> Date: Tue, 17 Jul 2018 23:28:18 +0800 Subject: [PATCH] update test --- tests/IOCContainerTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/IOCContainerTest.php b/tests/IOCContainerTest.php index bfddc18..d2cd653 100644 --- a/tests/IOCContainerTest.php +++ b/tests/IOCContainerTest.php @@ -157,13 +157,13 @@ public function testGetDiParams() public function testGetInstance() { - $foo = new Foo(); - $foz = new Foz(); - $expect = new Bar($foo, $foz); + // DI $result = IOCContainerFake::getInstance(Bar::class); - $this->assertEquals($expect, $result); + $this->assertEquals(1, $result->a); + $this->assertEquals(4, $result->b); + // DI nesting $result = IOCContainerFake::getInstance(Brr::class); $this->assertEquals(6, $result->a);