mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +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{
|
||||
|
||||
public static function setUpBeforeClass(){
|
||||
public static function setUpBeforeClass() : void{
|
||||
ItemFactory::init();
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ class RegionLoaderTest extends TestCase{
|
||||
/** @var RegionLoader */
|
||||
private $region;
|
||||
|
||||
public function setUp(){
|
||||
public function setUp() : void{
|
||||
$this->regionPath = sys_get_temp_dir() . '/test.testregion';
|
||||
if(file_exists($this->regionPath)){
|
||||
unlink($this->regionPath);
|
||||
@ -47,7 +47,7 @@ class RegionLoaderTest extends TestCase{
|
||||
$this->region->open();
|
||||
}
|
||||
|
||||
public function tearDown(){
|
||||
public function tearDown() : void{
|
||||
$this->region->close();
|
||||
if(file_exists($this->regionPath)){
|
||||
unlink($this->regionPath);
|
||||
|
@ -55,7 +55,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);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ use function defined;
|
||||
|
||||
class UtilsTest extends TestCase{
|
||||
|
||||
public function setUp(){
|
||||
public function setUp() : void{
|
||||
if(!defined('pocketmine\PATH')){
|
||||
define('pocketmine\PATH', 'dummy');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user