WarmupTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 5
dl 0
loc 28
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A itShouldFindAdviceAccordingToConfig() 0 22 1
1
<?php
2
3
namespace Go\Zend\Framework\Tests\Functional;
4
5
use Go\Zend\Framework\Console\Command\WarmupCommand;
6
use PHPUnit\Framework\TestCase;
7
use Prophecy\Argument;
8
use Symfony\Component\Console\Input\ArgvInput;
9
use Symfony\Component\Console\Input\Input;
10
use Symfony\Component\Console\Input\InputArgument;
11
use Symfony\Component\Console\Input\InputDefinition;
12
use Symfony\Component\Console\Input\InputInterface;
13
use Symfony\Component\Console\Output\OutputInterface;
14
15
/**
16
 * @package Go\Zend\Framework\Tests\Functional
17
 */
18
class WarmupTest extends TestCase
19
{
20
    /**
21
     * @test
22
     */
23
    public function itShouldFindAdviceAccordingToConfig()
24
    {
25
        $input = $this->prophesize(InputInterface::class);
26
        $input->bind(Argument::any())->willReturn();
27
        $input->isInteractive()->willReturn(false);
28
        $input->hasArgument(Argument::any())->willReturn(false);
29
        $input->validate()->willReturn();
30
31
        $input->getArgument('applicationConfig')
32
            ->willReturn(__DIR__ . '/../resources/application_config.php');
33
34
        $output = $this->getMockBuilder(OutputInterface::class)
35
            ->setMethods(['writeln'])
36
            ->getMockForAbstractClass();
37
38
        $output->expects($this->at(1))
39
            ->method('writeln')
40
            ->with('Total <info>1</info> files to process.');
41
42
        $command = new WarmupCommand();
43
        $command->run($input->reveal(), $output);
44
    }
45
}