| @@ 270-279 (lines=10) @@ | ||
| 267 | * @param SoapClient soap client |
|
| 268 | * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 269 | */ |
|
| 270 | protected function getEndpoint(SoapClient $client): Endpoint |
|
| 271 | { |
|
| 272 | $endpoint = $this->getMockBuilder("Component\Remote\BurzeDzisNet\Endpoint") |
|
| 273 | ->disableOriginalConstructor() |
|
| 274 | ->setMethods(['client', 'apiKey']) |
|
| 275 | ->getMock(); |
|
| 276 | $endpoint->method('client')->willReturn($client); |
|
| 277 | $endpoint->method('apiKey')->willReturn('4d36bcb5c40'); |
|
| 278 | return $endpoint; |
|
| 279 | } |
|
| 280 | } |
|
| 281 | ||
| @@ 67-76 (lines=10) @@ | ||
| 64 | * |
|
| 65 | * @expectedException \SoapFault |
|
| 66 | */ |
|
| 67 | public function testClientInvalidWSDL() |
|
| 68 | { |
|
| 69 | $endpoint = $this->getMockBuilder("Component\Remote\BurzeDzisNet\Endpoint") |
|
| 70 | ->disableOriginalConstructor() |
|
| 71 | ->setMethods(['wsdl', 'options']) |
|
| 72 | ->getMock(); |
|
| 73 | $endpoint->method('wsdl')->willReturn(\sprintf('%s%sInvalidExampleWSDL.xml', __DIR__, \DIRECTORY_SEPARATOR)); |
|
| 74 | $endpoint->method('options')->willReturn([]); |
|
| 75 | $endpoint->client(); |
|
| 76 | } |
|
| 77 | ||
| 78 | /** |
|
| 79 | * @covers Component\Remote\BurzeDzisNet\Endpoint::__construct |
|