88use Http \HttplugBundle \Collector \Formatter ;
99use Http \HttplugBundle \Collector \ProfileClient ;
1010use Http \HttplugBundle \Collector \ProfileClientFactory ;
11+ use Symfony \Component \Stopwatch \Stopwatch ;
1112
1213class ProfileClientFactoryTest extends \PHPUnit_Framework_TestCase
1314{
@@ -21,6 +22,11 @@ class ProfileClientFactoryTest extends \PHPUnit_Framework_TestCase
2122 */
2223 private $ formatter ;
2324
25+ /**
26+ * @var Stopwatch
27+ */
28+ private $ stopwatch ;
29+
2430 /**
2531 * @var HttpClient
2632 */
@@ -30,6 +36,7 @@ public function setUp()
3036 {
3137 $ this ->collector = $ this ->getMockBuilder (Collector::class)->disableOriginalConstructor ()->getMock ();
3238 $ this ->formatter = $ this ->getMockBuilder (Formatter::class)->disableOriginalConstructor ()->getMock ();
39+ $ this ->stopwatch = $ this ->getMockBuilder (Stopwatch::class)->getMock ();
3340 $ this ->client = $ this ->getMockBuilder (HttpClient::class)->getMock ();
3441 }
3542
@@ -38,7 +45,7 @@ public function testCreateClientFromClientFactory()
3845 $ factory = $ this ->getMockBuilder (ClientFactory::class)->getMock ();
3946 $ factory ->method ('createClient ' )->willReturn ($ this ->client );
4047
41- $ subject = new ProfileClientFactory ($ factory , $ this ->collector , $ this ->formatter );
48+ $ subject = new ProfileClientFactory ($ factory , $ this ->collector , $ this ->formatter , $ this -> stopwatch );
4249
4350 $ this ->assertInstanceOf (ProfileClient::class, $ subject ->createClient ());
4451 }
@@ -49,7 +56,7 @@ public function testCreateClientFromCallable()
4956 return $ this ->client ;
5057 };
5158
52- $ subject = new ProfileClientFactory ($ factory , $ this ->collector , $ this ->formatter );
59+ $ subject = new ProfileClientFactory ($ factory , $ this ->collector , $ this ->formatter , $ this -> stopwatch );
5360
5461 $ this ->assertInstanceOf (ProfileClient::class, $ subject ->createClient ());
5562 }
0 commit comments