AbstractCommandTest::propertyDoesNotExist()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * VersionControl_HG
4
 * Simple OO implementation for Mercurial.
5
 *
6
 * PHP Version 5.4
7
 *
8
 * @copyright 2014 Siad Ardroumli
9
 * @license http://www.opensource.org/licenses/mit-license.php MIT
10
 * @link http://siad007.github.io/versioncontrol_hg
11
 */
12
13
namespace Siad007\VersionControl\HG\Tests\Command;
14
15
class AbstractCommandTest extends \PHPUnit_Framework_TestCase
16
{
17
    /**
18
     * @test
19
     *
20
     * @expectedException \InvalidArgumentException
21
     */
22
    public function propertyDoesNotExist()
23
    {
24
        $abstractCommand = $this->getMockForAbstractClass('\\Siad007\\VersionControl\\HG\Command\\AbstractCommand');
25
26
        $abstractCommand->getTest();
27
    }
28
29
    /**
30
     * @test
31
     */
32
    public function propertyExist()
33
    {
34
        $abstractCommand = $this->getMockForAbstractClass('\\Siad007\\VersionControl\\HG\Command\\AbstractCommand');
35
36
        $this->assertFalse($abstractCommand->getVersion());
37
    }
38
39
    /**
40
     * @test
41
     *
42
     * @expectedException \InvalidArgumentException
43
     */
44
    public function wrongMethodPrefix()
45
    {
46
        $abstractCommand = $this->getMockForAbstractClass('\\Siad007\\VersionControl\\HG\Command\\AbstractCommand');
47
48
        $abstractCommand->testVersion();
49
    }
50
51
    /**
52
     * @test
53
     */
54
    public function hgPath()
55
    {
56
        $abstractCommand = $this->getMockForAbstractClass('\\Siad007\\VersionControl\\HG\Command\\AbstractCommand');
57
        $abstractCommand->setHgPath('/test/path/to/hg');
58
59
        $this->assertSame('/test/path/to/hg', $abstractCommand->getHgPath());
60
    }
61
}
62