File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 33
44## Unreleased
55
6+ - MockClientStategy class fixed
7+
68## 1.2.0 - 2017-02-12
79
810### Added
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace spec \Http \Discovery \Strategy ;
4+
5+ use Http \Client \HttpClient ;
6+ use Http \Discovery \ClassDiscovery ;
7+ use Http \Discovery \Strategy \DiscoveryStrategy ;
8+ use Http \Discovery \Strategy ;
9+ use PhpSpec \ObjectBehavior ;
10+ use spec \Http \Discovery \Helper \DiscoveryHelper ;
11+
12+ class MockClientStrategySpec extends ObjectBehavior
13+ {
14+ function let ()
15+ {
16+ ClassDiscovery::setStrategies ([Strategy \MockClientStrategy::class]);
17+ }
18+
19+ function it_should_return_the_mock_client (DiscoveryStrategy $ strategy )
20+ {
21+ $ candidates = $ this ->getCandidates (HttpClient::class);
22+ $ candidates ->shouldBeArray ();
23+ $ candidates ->shouldHaveCount (1 );
24+ }
25+ }
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ final class MockClientStrategy implements DiscoveryStrategy
1818 public static function getCandidates ($ type )
1919 {
2020 return ($ type === HttpClient::class)
21- ? ['class ' => Mock::class, 'condition ' => Mock::class]
21+ ? [[ 'class ' => Mock::class, 'condition ' => Mock::class] ]
2222 : [];
2323 }
2424}
You can’t perform that action at this time.
0 commit comments