File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 33
44## Unreleased
55
6+ ### Added
7+
8+ - MockClientStrategy class.
9+
610## 1.1.1 - 2016-11-27
711
812### Changed
913
1014- 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.
1216
1317## 1.1.0 - 2016-10-20
1418
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