Passed
Push — main ( 2c83d5...fb3f8a )
by Siad
05:21
created

VariableTest::testVariable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

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