Completed
Push — master ( 9cf089...a49cfd )
by Siad
12:42
created

PhingTaskTest::test2()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
 *
15
 * This software consists of voluntary contributions made by many individuals
16
 * and is licensed under the LGPL. For more information please see
17
 * <http://phing.info>.
18
 */
19
20
/**
21
 * Testcase for the Phing task/condition.
22
 *
23
 * @author Siad Ardroumli <[email protected]>
24
 * @package phing.tasks.system
25
 */
26
class PhingTaskTest extends BuildFileTest
27
{
28
    public function setUp(): void
29
    {
30
        $this->configureProject(PHING_TEST_BASE . '/etc/tasks/system/phing.xml');
31
    }
32
33
    public function tearDown(): void
34
    {
35
        $this->getProject()->executeTarget('cleanup');
36
    }
37
38
    public function test1(): void
39
    {
40
        $this->expectBuildException(__FUNCTION__, 'phing task self referencing.');
41
    }
42
43
    public function test2(): void
44
    {
45
        $this->expectBuildException(__FUNCTION__, 'phingcall without arguments.');
46
    }
47
48
    public function test3(): void
49
    {
50
        $this->expectBuildException(__FUNCTION__, 'No BuildException thrown.');
51
    }
52
53
    public function test4(): void
54
    {
55
        $this->expectBuildException(__FUNCTION__, 'phingcall with empty target.');
56
    }
57
58
    public function test4b(): void
59
    {
60
        $this->expectBuildException(__FUNCTION__, 'phingcall with not existing target.');
61
    }
62
63
    public function test5(): void
64
    {
65
        $this->getProject()->executeTarget(__FUNCTION__);
66
    }
67
68
    public function test6(): void
69
    {
70
        $this->getProject()->executeTarget(__FUNCTION__);
71
    }
72
}
73