| 1 | <?php |
||
| 9 | class RabbitMqSupervisorTest extends \PHPUnit_Framework_TestCase |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var \PHPUnit_Framework_MockObject_MockObject|Supervisor |
||
| 13 | */ |
||
| 14 | private $supervisor; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var \PHPUnit_Framework_MockObject_MockObject|EngineInterface |
||
| 18 | */ |
||
| 19 | private $templating; |
||
| 20 | |||
| 21 | protected function setUp() |
||
| 22 | { |
||
| 23 | $this->supervisor = $this->getMockBuilder(Supervisor::class)->disableOriginalConstructor()->getMock(); |
||
| 24 | $this->templating = $this->getMock(EngineInterface::class); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function testExecute() |
||
| 28 | { |
||
| 29 | $this->supervisor->expects(self::once())->method('run'); |
||
| 30 | $this->supervisor->expects(self::once())->method('reloadAndUpdate'); |
||
| 31 | |||
| 32 | $service = new RabbitMqSupervisor( |
||
| 33 | $this->supervisor, |
||
| 34 | $this->templating, |
||
| 35 | [], |
||
| 36 | [] |
||
| 37 | ); |
||
| 38 | |||
| 39 | $service->start(); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |