Conditions | 1 |
Paths | 1 |
Total Lines | 30 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function キューを作るコマンドを実行する() |
||
16 | { |
||
17 | $client = Phake::mock('Aws\Sqs\SqsClient'); |
||
18 | $container = Phake::mock('Symfony\Component\DependencyInjection\Container'); |
||
19 | |||
20 | Phake::when($container)->get('sqs_job_queue.client')->thenReturn($client); |
||
21 | |||
22 | |||
23 | $application = new Application(); |
||
24 | $application->add(new QueueCreateCommand()); |
||
25 | |||
26 | $command = $application->get('sqs_job_queue:queue-create'); |
||
27 | $command->setContainer($container); |
||
28 | |||
29 | $tester = new CommandTester($command); |
||
30 | $tester->execute(array( |
||
31 | 'command' => $command->getName(), |
||
32 | 'queue' => 'test_queue' |
||
33 | )); |
||
34 | |||
35 | Phake::verify($container)->get('sqs_job_queue.client'); |
||
36 | Phake::verify($client)->createQueue(array( |
||
37 | 'QueueName' => 'test_queue', |
||
38 | 'Attributes' => array( |
||
39 | 'DelaySeconds' => 0 |
||
40 | ), |
||
41 | )); |
||
42 | |||
43 | |||
44 | } |
||
45 | } |