WP File Manager
Current Path:
/
home
/
itutorethiopia
/
public_html
/
vendor
/
mtdowling
/
jmespath.php
/
tests
/
Name
Action
..
ComplianceTest.php
Edit
EnvTest.php
Edit
FnDispatcherTest.php
Edit
LexerTest.php
Edit
ParserTest.php
Edit
SyntaxErrorExceptionTest.php
Edit
TreeCompilerTest.php
Edit
TreeInterpreterTest.php
Edit
UtilsTest.php
Edit
compliance
Editing: SyntaxErrorExceptionTest.php
<?php namespace JmesPath\Tests; use JmesPath\SyntaxErrorException; /** * @covers JmesPath\SyntaxErrorException */ class SyntaxErrorExceptionTest extends \PHPUnit_Framework_TestCase { public function testCreatesWithNoArray() { $e = new SyntaxErrorException( 'Found comma', ['type' => 'comma', 'pos' => 3, 'value' => ','], 'abc,def' ); $expected = <<<EOT Syntax error at character 3 abc,def ^ Found comma EOT; $this->assertContains($expected, $e->getMessage()); } public function testCreatesWithArray() { $e = new SyntaxErrorException( ['dot' => true, 'eof' => true], ['type' => 'comma', 'pos' => 3, 'value' => ','], 'abc,def' ); $expected = <<<EOT Syntax error at character 3 abc,def ^ Expected one of the following: dot, eof; found comma "," EOT; $this->assertContains($expected, $e->getMessage()); } }