Fixed tests broken by 88c4b836f09278a2d81a14356ff3c29ce465de1d

This commit is contained in:
Dylan K. Taylor 2019-02-20 11:16:08 +00:00
parent 2c8a065b94
commit 15d4201c3a

View File

@ -37,7 +37,7 @@ class BlockTest extends TestCase{
public function testAccidentalOverrideBlock() : void{
$block = new MyCustomBlock();
$this->expectException(\InvalidArgumentException::class);
BlockFactory::registerBlock($block);
BlockFactory::register($block);
}
/**
@ -45,7 +45,7 @@ class BlockTest extends TestCase{
*/
public function testDeliberateOverrideBlock() : void{
$block = new MyCustomBlock();
BlockFactory::registerBlock($block, true);
BlockFactory::register($block, true);
self::assertInstanceOf(MyCustomBlock::class, BlockFactory::get($block->getId()));
}
@ -56,7 +56,7 @@ class BlockTest extends TestCase{
for($i = 0; $i < 256; ++$i){
if(!BlockFactory::isRegistered($i)){
$b = new StrangeNewBlock($i);
BlockFactory::registerBlock($b);
BlockFactory::register($b);
self::assertInstanceOf(StrangeNewBlock::class, BlockFactory::get($b->getId()));
return;
}
@ -70,7 +70,7 @@ class BlockTest extends TestCase{
*/
public function testRegisterIdTooLarge() : void{
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{
self::expectException(\RuntimeException::class);
BlockFactory::registerBlock(new OutOfBoundsBlock(-1));
BlockFactory::register(new OutOfBoundsBlock(-1));
}
/**