File tree 3 files changed +28
-1
lines changed
3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 3
3
4
4
## Unreleased
5
5
6
+ - MockClientStategy class fixed
7
+
6
8
## 1.2.0 - 2017-02-12
7
9
8
10
### 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
18
18
public static function getCandidates ($ type )
19
19
{
20
20
return ($ type === HttpClient::class)
21
- ? ['class ' => Mock::class, 'condition ' => Mock::class]
21
+ ? [[ 'class ' => Mock::class, 'condition ' => Mock::class] ]
22
22
: [];
23
23
}
24
24
}
You can’t perform that action at this time.
0 commit comments