File tree 2 files changed +29
-1
lines changed
2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 3
3
4
4
## Unreleased
5
5
6
+ ### Added
7
+
8
+ - MockClientStrategy class.
9
+
6
10
## 1.1.1 - 2016-11-27
7
11
8
12
### Changed
9
13
10
14
- Made exception messages clearer. ` StrategyUnavailableException ` is no longer the previous exception to ` DiscoveryFailedException ` .
11
- - ` CommonClassesStrategy ` is using ` self ` instead of ` static ` . Using ` static ` makes no sense when ` CommonClassesStrategy ` is final.
15
+ - ` CommonClassesStrategy ` is using ` self ` instead of ` static ` . Using ` static ` makes no sense when ` CommonClassesStrategy ` is final.
12
16
13
17
## 1.1.0 - 2016-10-20
14
18
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Http \Discovery \Strategy ;
4
+
5
+ use Http \Client \HttpClient ;
6
+ use Http \Mock \Client as Mock ;
7
+
8
+ /**
9
+ * Find the Mock client.
10
+ *
11
+ * @author Sam Rapaport <[email protected] >
12
+ */
13
+ final class MockClientStrategy implements DiscoveryStrategy
14
+ {
15
+ /**
16
+ * {@inheritdoc}
17
+ */
18
+ public static function getCandidates ($ type )
19
+ {
20
+ return ($ type === HttpClient::class)
21
+ ? ['class ' => Mock::class, 'condition ' => Mock::class]
22
+ : [];
23
+ }
24
+ }
You can’t perform that action at this time.
0 commit comments