OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
3-31-025chanakya
/
Xpress
/
vendor
/
mtdowling
/
jmespath.php
/
tests
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/26/2025 04:24:28 AM
rwxr-xr-x
📄
ComplianceTest.php
4.11 KB
03/26/2025 04:23:10 AM
rw-r--r--
📄
EnvTest.php
928 bytes
03/26/2025 04:23:10 AM
rw-r--r--
📄
FnDispatcherTest.php
1.05 KB
03/26/2025 04:23:10 AM
rw-r--r--
📄
LexerTest.php
2.71 KB
03/26/2025 04:23:10 AM
rw-r--r--
📄
ParserTest.php
1.06 KB
03/26/2025 04:23:10 AM
rw-r--r--
📄
SyntaxErrorExceptionTest.php
1.04 KB
03/26/2025 04:23:10 AM
rw-r--r--
📄
TreeCompilerTest.php
730 bytes
03/26/2025 04:23:10 AM
rw-r--r--
📄
TreeInterpreterTest.php
1.99 KB
03/26/2025 04:23:10 AM
rw-r--r--
📄
UtilsTest.php
3.67 KB
03/26/2025 04:23:10 AM
rw-r--r--
📁
compliance
-
03/26/2025 04:28:06 AM
rwxr-xr-x
Editing: FnDispatcherTest.php
Close
<?php namespace JmesPath\Tests; use JmesPath\fnDispatcher; use PHPUnit\Framework\TestCase; class fnDispatcherTest extends TestCase { public function testConvertsToString(): void { $fn = new FnDispatcher(); $this->assertEquals('foo', $fn('to_string', ['foo'])); $this->assertEquals('1', $fn('to_string', [1])); $this->assertEquals('["foo"]', $fn('to_string', [['foo']])); $std = new \stdClass(); $std->foo = 'bar'; $this->assertEquals('{"foo":"bar"}', $fn('to_string', [$std])); $this->assertEquals('foo', $fn('to_string', [new _TestStringClass()])); $this->assertEquals('"foo"', $fn('to_string', [new _TestJsonStringClass()])); } } class _TestStringClass { public function __toString(): string { return 'foo'; } } class _TestJsonStringClass implements \JsonSerializable { public function __toString(): string { return 'no!'; } public function jsonSerialize(): string { return 'foo'; } }