1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Mcustiel\Phiremock\Common\Utils\V2; |
4
|
|
|
|
5
|
|
|
use Mcustiel\Phiremock\Common\Utils\V1\Factory as FactoryV1; |
6
|
|
|
|
7
|
|
|
class Factory extends FactoryV1 |
8
|
|
|
{ |
9
|
|
|
public function createArrayToExpectationConverter(): ArrayToExpectationConverter |
10
|
|
|
{ |
11
|
|
|
return new ArrayToExpectationConverter( |
12
|
|
|
$this->createArrayToRequestConditionConverter(), |
13
|
|
|
$this->createArrayToResponseConverterLocator() |
14
|
|
|
); |
15
|
|
|
} |
16
|
|
|
|
17
|
|
|
public function createArrayToStateConditionsConverter(): ArrayToStateConditionsConverter |
18
|
|
|
{ |
19
|
|
|
return new ArrayToStateConditionsConverter(); |
20
|
|
|
} |
21
|
|
|
|
22
|
|
|
public function createArrayToResponseConverterLocator(): ArrayToResponseConverterLocator |
23
|
|
|
{ |
24
|
|
|
return new ArrayToResponseConverterLocator($this); |
25
|
|
|
} |
26
|
|
|
|
27
|
|
|
public function createArrayToHttpResponseConverter(): ArrayToHttpResponseConverter |
28
|
|
|
{ |
29
|
|
|
return new ArrayToHttpResponseConverter(); |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
public function createArrayToProxyResponseConverter(): ArrayToProxyResponseConverter |
33
|
|
|
{ |
34
|
|
|
return new ArrayToProxyResponseConverter(); |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
public function createArrayToRequestConditionConverter(): ArrayToRequestConditionConverter |
38
|
|
|
{ |
39
|
|
|
return new ArrayToRequestConditionConverter(); |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
public function createExpectationToArrayConverter(): ExpectationToArrayConverter |
43
|
|
|
{ |
44
|
|
|
return new ExpectationToArrayConverter( |
45
|
|
|
$this->createRequestConditionToArrayConverter(), |
46
|
|
|
$this->createResponseToArrayConverterLocator() |
47
|
|
|
); |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
public function createHttpResponseToArrayConverter(): HttpResponseToArrayConverter |
51
|
|
|
{ |
52
|
|
|
return new HttpResponseToArrayConverter(); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function createProxyResponseToArrayConverter(): ProxyResponseToArrayConverter |
56
|
|
|
{ |
57
|
|
|
return new ProxyResponseToArrayConverter(); |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
public function createResponseToArrayConverterLocator(): ResponseToArrayConverterLocator |
61
|
|
|
{ |
62
|
|
|
return new ResponseToArrayConverterLocator($this); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
public function createRequestConditionToArrayConverter(): RequestConditionToArrayConverter |
66
|
|
|
{ |
67
|
|
|
return new RequestConditionToArrayConverter(); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
public function createArrayToScenarioStateInfoConverter(): ArrayToScenarioStateInfoConverter |
71
|
|
|
{ |
72
|
|
|
return new ArrayToScenarioStateInfoConverter(); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
public function createScenarioStateInfoToArrayConverter(): ScenarioStateInfoToArrayConverter |
76
|
|
|
{ |
77
|
|
|
return new ScenarioStateInfoToArrayConverter(); |
78
|
|
|
} |
79
|
|
|
} |
80
|
|
|
|