update 1.0.8.0

Commits for version update
This commit is contained in:
Manish Verma
2016-10-17 12:02:27 +05:30
parent dec927987b
commit 76e85db070
9674 changed files with 495757 additions and 58922 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace JmesPath\Tests;
use JmesPath\Env;
use JmesPath\CompilerRuntime;
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'));
}
}