tests/phpunit: added missing native typehints

This commit is contained in:
Dylan K. Taylor 2020-02-06 12:13:42 +00:00
parent 7d5f2eac8d
commit e12618c705
4 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ use pocketmine\item\ItemFactory;
class BaseInventoryTest extends TestCase{
public static function setUpBeforeClass(){
public static function setUpBeforeClass() : void{
ItemFactory::init();
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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');
}