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

ExitTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 14
rs 10
c 1
b 0
f 0
wmc 1
lcom 1
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A testExitOpSuccess() 0 11 1
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