mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
tests/phpunit: added missing native typehints
This commit is contained in:
parent
7d5f2eac8d
commit
e12618c705
@ -29,7 +29,7 @@ use pocketmine\item\ItemFactory;
|
|||||||
|
|
||||||
class BaseInventoryTest extends TestCase{
|
class BaseInventoryTest extends TestCase{
|
||||||
|
|
||||||
public static function setUpBeforeClass(){
|
public static function setUpBeforeClass() : void{
|
||||||
ItemFactory::init();
|
ItemFactory::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class RegionLoaderTest extends TestCase{
|
|||||||
/** @var RegionLoader */
|
/** @var RegionLoader */
|
||||||
private $region;
|
private $region;
|
||||||
|
|
||||||
public function setUp(){
|
public function setUp() : void{
|
||||||
$this->regionPath = sys_get_temp_dir() . '/test.testregion';
|
$this->regionPath = sys_get_temp_dir() . '/test.testregion';
|
||||||
if(file_exists($this->regionPath)){
|
if(file_exists($this->regionPath)){
|
||||||
unlink($this->regionPath);
|
unlink($this->regionPath);
|
||||||
@ -47,7 +47,7 @@ class RegionLoaderTest extends TestCase{
|
|||||||
$this->region->open();
|
$this->region->open();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown(){
|
public function tearDown() : void{
|
||||||
$this->region->close();
|
$this->region->close();
|
||||||
if(file_exists($this->regionPath)){
|
if(file_exists($this->regionPath)){
|
||||||
unlink($this->regionPath);
|
unlink($this->regionPath);
|
||||||
|
@ -55,7 +55,7 @@ class StupidJsonDecodeTest extends TestCase{
|
|||||||
*
|
*
|
||||||
* @throws \ReflectionException
|
* @throws \ReflectionException
|
||||||
*/
|
*/
|
||||||
public function testStupidJsonDecode(string $brokenJson, $expect){
|
public function testStupidJsonDecode(string $brokenJson, $expect) : void{
|
||||||
$decoded = ($this->stupidJsonDecodeFunc)($brokenJson, true);
|
$decoded = ($this->stupidJsonDecodeFunc)($brokenJson, true);
|
||||||
self::assertEquals($expect, $decoded);
|
self::assertEquals($expect, $decoded);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ use function defined;
|
|||||||
|
|
||||||
class UtilsTest extends TestCase{
|
class UtilsTest extends TestCase{
|
||||||
|
|
||||||
public function setUp(){
|
public function setUp() : void{
|
||||||
if(!defined('pocketmine\PATH')){
|
if(!defined('pocketmine\PATH')){
|
||||||
define('pocketmine\PATH', 'dummy');
|
define('pocketmine\PATH', 'dummy');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user