| 1 | <?php |
||
| 5 | abstract class AbstractManagerTest extends \PHPUnit_Framework_TestCase |
||
| 6 | { |
||
| 7 | protected $configuration; |
||
| 8 | protected $client; |
||
| 9 | |||
| 10 | public function setUp() |
||
| 11 | { |
||
| 12 | $this->client = $this->prophesize('RabbitMq\ManagementApi\Client'); |
||
| 13 | |||
| 14 | $this->configuration = $this->prophesize('Ola\RabbitMqAdminToolkitBundle\VhostConfiguration'); |
||
| 15 | $this->configuration->getClient()->willReturn($this->client->reveal()); |
||
| 16 | $this->configuration->getName()->willReturn('vhost'); |
||
| 17 | |||
| 18 | } |
||
| 19 | |||
| 20 | protected function get404Exception() |
||
| 21 | { |
||
| 22 | $response = $this->prophesize('Guzzle\Http\Message\Response'); |
||
| 23 | $response->getStatusCode()->willReturn(404); |
||
| 24 | |||
| 25 | $exception = $this->prophesize('Guzzle\Http\Exception\ClientErrorResponseException'); |
||
| 26 | $exception->getResponse()->willReturn($response->reveal()); |
||
| 27 | |||
| 28 | return $exception; |
||
| 29 | } |
||
| 30 | } |
||
| 31 |