Passed
Push — master ( 7a9799...2aee06 )
by Michiel
06:03
created

VariableTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
namespace Phing\Task\System\Property;
21
22
use Phing\Support\BuildFileTest;
23
24
/**
25
 * Tests the PropertyRegexTask Task
26
 *
27
 * @author  Siad Ardroumli <[email protected]>
28
 * @package phing.tasks.ext.property
29
 */
30
class VariableTest extends BuildFileTest
31
{
32
33
    public function setUp(): void
34
    {
35
        $this->configureProject(
36
            PHING_TEST_BASE . '/etc/tasks/ext/property/VariableTest.xml'
37
        );
38
    }
39
40
    /**
41
     * @requires PHP > 5.3
42
     */
43
    public function testVariable()
44
    {
45
        $this->executeTarget(__FUNCTION__);
46
47
        $this->assertInLogs('1: aazz');
48
        $this->assertInLogs('2: aazz');
49
        $this->assertInLogs('3: x = 6');
50
        $this->assertInLogs('4: x = 12');
51
        $this->assertInLogs('5: x = 6 + 12');
52
        $this->assertInLogs('6: I  am  a  string.');
53
        $this->assertInLogs('7: x = 6');
54
        $this->assertInLogs('8: x = 6');
55
    }
56
}
57