mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Fixed tests broken by 88c4b836f09278a2d81a14356ff3c29ce465de1d
This commit is contained in:
parent
2c8a065b94
commit
15d4201c3a
@ -37,7 +37,7 @@ class BlockTest extends TestCase{
|
|||||||
public function testAccidentalOverrideBlock() : void{
|
public function testAccidentalOverrideBlock() : void{
|
||||||
$block = new MyCustomBlock();
|
$block = new MyCustomBlock();
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
BlockFactory::registerBlock($block);
|
BlockFactory::register($block);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,7 +45,7 @@ class BlockTest extends TestCase{
|
|||||||
*/
|
*/
|
||||||
public function testDeliberateOverrideBlock() : void{
|
public function testDeliberateOverrideBlock() : void{
|
||||||
$block = new MyCustomBlock();
|
$block = new MyCustomBlock();
|
||||||
BlockFactory::registerBlock($block, true);
|
BlockFactory::register($block, true);
|
||||||
self::assertInstanceOf(MyCustomBlock::class, BlockFactory::get($block->getId()));
|
self::assertInstanceOf(MyCustomBlock::class, BlockFactory::get($block->getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ class BlockTest extends TestCase{
|
|||||||
for($i = 0; $i < 256; ++$i){
|
for($i = 0; $i < 256; ++$i){
|
||||||
if(!BlockFactory::isRegistered($i)){
|
if(!BlockFactory::isRegistered($i)){
|
||||||
$b = new StrangeNewBlock($i);
|
$b = new StrangeNewBlock($i);
|
||||||
BlockFactory::registerBlock($b);
|
BlockFactory::register($b);
|
||||||
self::assertInstanceOf(StrangeNewBlock::class, BlockFactory::get($b->getId()));
|
self::assertInstanceOf(StrangeNewBlock::class, BlockFactory::get($b->getId()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ class BlockTest extends TestCase{
|
|||||||
*/
|
*/
|
||||||
public function testRegisterIdTooLarge() : void{
|
public function testRegisterIdTooLarge() : void{
|
||||||
self::expectException(\RuntimeException::class);
|
self::expectException(\RuntimeException::class);
|
||||||
BlockFactory::registerBlock(new OutOfBoundsBlock(25555));
|
BlockFactory::register(new OutOfBoundsBlock(25555));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,7 +78,7 @@ class BlockTest extends TestCase{
|
|||||||
*/
|
*/
|
||||||
public function testRegisterIdTooSmall() : void{
|
public function testRegisterIdTooSmall() : void{
|
||||||
self::expectException(\RuntimeException::class);
|
self::expectException(\RuntimeException::class);
|
||||||
BlockFactory::registerBlock(new OutOfBoundsBlock(-1));
|
BlockFactory::register(new OutOfBoundsBlock(-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user