Passed
Push — main ( ddd1a4...b98cb8 )
by Michiel
08:47
created

HgLogTaskTest::testMaxCountShouldBeAnInteger2()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Phing\Task\Optional\Hg;
4
5
use Phing\Support\BuildFileTest;
6
7
/**
8
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
16
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19
 *
20
 * This software consists of voluntary contributions made by many individuals
21
 * and is licensed under the LGPL. For more information please see
22
 * <http://phing.info>.
23
 */
24
class HgLogTaskTest extends BuildFileTest
25
{
26
    public function setUp(): void
27
    {
28
        mkdir(PHING_TEST_BASE . '/tmp/hgtest');
29
        $this->configureProject(
30
            PHING_TEST_BASE
31
            . '/etc/tasks/ext/hg/HgLogTaskTest.xml'
32
        );
33
    }
34
35
    public function tearDown(): void
36
    {
37
        $this->rmdir(PHING_TEST_BASE . "/tmp/hgtest");
38
    }
39
40
    public function testMaxCountShouldBeAnInteger()
41
    {
42
        $this->expectBuildExceptionContaining(
43
            'maxCountShouldBeAnInteger',
44
            'maxCountShouldBeAnInteger',
45
            "maxcount should be a positive integer."
46
        );
47
    }
48
49
    public function testMaxCountShouldBeAnInteger2()
50
    {
51
        $this->expectBuildExceptionContaining(
52
            'maxCountShouldBeAnInteger2',
53
            'maxCountShouldBeAnInteger',
54
            "maxcount should be a positive integer."
55
        );
56
    }
57
}
58