for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Tests\PHPSA\Expression;
use PhpParser\Node;
use PHPSA\CompiledExpression;
use PHPSA\Compiler\Expression;
class PrintTest extends \Tests\PHPSA\TestCase
{
public function testPrintOpSuccess()
$baseExpression = new Node\Expr\Print_(
$this->newScalarExpr("test")
);
$compiledExpression = $this->compileExpression($baseExpression);
$this->assertInstanceOfCompiledExpression($compiledExpression);
$this->assertSame(CompiledExpression::INTEGER, $compiledExpression->getType());
$this->assertSame(1, $compiledExpression->getValue());
}