mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Merge branch 'stable'
This commit is contained in:
@ -33,6 +33,10 @@ class StupidJsonDecodeTest extends TestCase{
|
||||
$this->stupidJsonDecodeFunc = (new \ReflectionMethod(InGamePacketHandler::class, 'stupid_json_decode'))->getClosure();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed[][]
|
||||
* @phpstan-return list<array{string,mixed}>
|
||||
*/
|
||||
public function stupidJsonDecodeProvider() : array{
|
||||
return [
|
||||
["[\n \"a\",\"b,c,d,e\\\" \",,0,1,2, false, 0.001]", ['a', 'b,c,d,e" ', '', 0, 1, 2, false, 0.001]],
|
||||
@ -55,7 +59,7 @@ class StupidJsonDecodeTest extends TestCase{
|
||||
*
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function testStupidJsonDecode(string $brokenJson, $expect){
|
||||
public function testStupidJsonDecode(string $brokenJson, $expect) : void{
|
||||
$decoded = ($this->stupidJsonDecodeFunc)($brokenJson, true);
|
||||
self::assertEquals($expect, $decoded);
|
||||
}
|
||||
|
Reference in New Issue
Block a user