Passed
Push — master ( abdf08...d13c62 )
by Anton
03:38 queued 01:50
created

CleanTest::testUpdateClean()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Spiral Framework.
4
 *
5
 * @license   MIT
6
 * @author    Anton Titov (Wolfy-J)
7
 */
8
9
namespace Spiral\Framework\Framework;
10
11
use Spiral\Framework\ConsoleTest;
12
13
/**
14
 * @covers \Spiral\Command\CleanCommand
15
 */
16
class CleanTest extends ConsoleTest
17
{
18
    public function testClean()
19
    {
20
        $this->runCommand('configure');
21
22
        $output = $this->runCommand('cache:clean');
23
        $this->assertContains('Runtime cache has been cleared', $output);
24
    }
25
26
    public function testClean2()
27
    {
28
        $output = $this->runCommand('cache:clean');
29
        $this->assertContains('Cache directory is missing', $output);
30
    }
31
32
    public function testCleanVerbose()
33
    {
34
        $this->runCommand('configure');
35
36
        $output = $this->runCommandDebug('cache:clean');
37
        $this->assertContains('i18n', $output);
38
    }
39
40
    public function testUpdateClean()
41
    {
42
        $out = $this->runCommand('update');
43
        $this->assertContains('Updating ORM schema', $out);
44
45
        $output = $this->runCommandDebug('cache:clean');
46
        $this->assertContains('cycle.php', $output);
47
    }
48
}