mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 02:21:46 +00:00
Merge branch 'stable'
This commit is contained in:
commit
735efeaa13
@ -5,23 +5,24 @@
|
|||||||
|
|
||||||
[](https://travis-ci.org/pmmp/PocketMine-MP)
|
[](https://travis-ci.org/pmmp/PocketMine-MP)
|
||||||
|
|
||||||
### Getting started
|
## Getting started
|
||||||
- [Documentation](http://pmmp.readthedocs.org/)
|
- [Documentation](http://pmmp.readthedocs.org/)
|
||||||
- [Installation instructions](https://pmmp.readthedocs.io/en/rtfd/installation.html)
|
- [Installation instructions](https://pmmp.readthedocs.io/en/rtfd/installation.html)
|
||||||
- [Docker image](https://hub.docker.com/r/pmmp/pocketmine-mp)
|
- [Docker image](https://hub.docker.com/r/pmmp/pocketmine-mp)
|
||||||
- [Plugin repository](https://poggit.pmmp.io/plugins)
|
- [Plugin repository](https://poggit.pmmp.io/plugins)
|
||||||
|
|
||||||
### Discussion
|
## Discussion/Help
|
||||||
- [Forums](https://forums.pmmp.io/)
|
- [Forums](https://forums.pmmp.io/)
|
||||||
- [Community Discord](https://discord.gg/bmSAZBG)
|
- [Community Discord](https://discord.gg/bmSAZBG)
|
||||||
|
- [StackOverflow](https://stackoverflow.com/tags/pocketmine)
|
||||||
|
|
||||||
### For developers
|
## For developers
|
||||||
* [Latest API documentation](https://jenkins.pmmp.io/job/PocketMine-MP-doc/doxygen/) - Doxygen documentation generated from development
|
* [Latest API documentation](https://jenkins.pmmp.io/job/PocketMine-MP-doc/doxygen/) - Doxygen documentation generated from development
|
||||||
* [DevTools](https://github.com/pmmp/PocketMine-DevTools/) - Development tools plugin for creating plugins
|
* [DevTools](https://github.com/pmmp/PocketMine-DevTools/) - Development tools plugin for creating plugins
|
||||||
* [ExamplePlugin](https://github.com/pmmp/ExamplePlugin/) - Example plugin demonstrating some basic API features
|
* [ExamplePlugin](https://github.com/pmmp/ExamplePlugin/) - Example plugin demonstrating some basic API features
|
||||||
* [Contributing Guidelines](CONTRIBUTING.md)
|
* [Contributing Guidelines](CONTRIBUTING.md)
|
||||||
|
|
||||||
### Donate
|
## Donate
|
||||||
- Bitcoin Cash (BCH): `qq3r46hn6ljnhnqnfwxt5pg3g447eq9jhvw5ddfear`
|
- Bitcoin Cash (BCH): `qq3r46hn6ljnhnqnfwxt5pg3g447eq9jhvw5ddfear`
|
||||||
- Bitcoin (BTC): `171u8K9e4FtU6j3e5sqNoxKUgEw9qWQdRV`
|
- Bitcoin (BTC): `171u8K9e4FtU6j3e5sqNoxKUgEw9qWQdRV`
|
||||||
- [Patreon](https://www.patreon.com/pocketminemp)
|
- [Patreon](https://www.patreon.com/pocketminemp)
|
||||||
|
@ -26,6 +26,12 @@ namespace pocketmine\network\mcpe\handler;
|
|||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class StupidJsonDecodeTest extends TestCase{
|
class StupidJsonDecodeTest extends TestCase{
|
||||||
|
/** @var \Closure */
|
||||||
|
private $stupidJsonDecodeFunc;
|
||||||
|
|
||||||
|
public function setUp() : void{
|
||||||
|
$this->stupidJsonDecodeFunc = (new \ReflectionMethod(InGamePacketHandler::class, 'stupid_json_decode'))->getClosure();
|
||||||
|
}
|
||||||
|
|
||||||
public function stupidJsonDecodeProvider() : array{
|
public function stupidJsonDecodeProvider() : array{
|
||||||
return [
|
return [
|
||||||
@ -48,10 +54,7 @@ class StupidJsonDecodeTest extends TestCase{
|
|||||||
* @throws \ReflectionException
|
* @throws \ReflectionException
|
||||||
*/
|
*/
|
||||||
public function testStupidJsonDecode(string $brokenJson, $expect){
|
public function testStupidJsonDecode(string $brokenJson, $expect){
|
||||||
$func = new \ReflectionMethod(InGamePacketHandler::class, 'stupid_json_decode');
|
$decoded = ($this->stupidJsonDecodeFunc)($brokenJson, true);
|
||||||
$func->setAccessible(true);
|
|
||||||
|
|
||||||
$decoded = $func->invoke(null, $brokenJson, true);
|
|
||||||
self::assertEquals($expect, $decoded);
|
self::assertEquals($expect, $decoded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user