Completed
Pull Request — master (#149)
by Enrico
04:21
created

ExitTest::testExitOpSuccess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 11
rs 9.4285
c 1
b 0
f 0
1
<?php
2
3
namespace Tests\PHPSA\Expression;
4
5
use PhpParser\Node;
6
use PHPSA\CompiledExpression;
7
use PHPSA\Compiler\Expression;
8
9
class ExitTest extends \Tests\PHPSA\TestCase
10
{
11
    public function testExitOpSuccess()
12
    {
13
        $baseExpression = new Node\Expr\Exit_(
14
            $this->newScalarExpr("test")
15
        );
16
        $compiledExpression = $this->compileExpression($baseExpression);
17
18
        $this->assertInstanceOfCompiledExpression($compiledExpression);
19
        $this->assertSame(CompiledExpression::STRING, $compiledExpression->getType());
20
        $this->assertSame("test", $compiledExpression->getValue());
21
    }
22
}
23