PurgeCommandTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 6
Bugs 1 Features 2
Metric Value
c 6
b 1
f 2
dl 0
loc 27
wmc 3
lcom 1
cbo 3
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCommandInstance() 0 4 1
A getCommand() 0 4 1
A testExecute() 0 5 1
1
<?php
2
3
namespace Sleepness\UberTranslationBundle\Tests\Command;
4
5
use Sleepness\UberTranslationBundle\Command\PurgeCommand;
6
7
/**
8
 * Test memcached purging command
9
 *
10
 * @author Viktor Novikov <[email protected]>
11
 * @author Alexandr Zhulev <[email protected]>
12
 */
13
class PurgeCommandTest extends CommandTestCase
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    protected function getCommandInstance()
19
    {
20
        return new PurgeCommand();
21
    }
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    protected function getCommand()
27
    {
28
        return 'uber:translations:purge';
29
    }
30
31
    /**
32
     * Test purge command execution
33
     */
34
    public function testExecute()
35
    {
36
        $this->commandTester->execute(array());
37
        $this->assertTrue(is_string($this->commandTester->getDisplay()));
38
    }
39
}
40