Fixed tests

This commit is contained in:
Dylan K. Taylor 2022-03-23 15:27:57 +00:00
parent 334c9daa6a
commit 3c5300556a
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -71,19 +71,11 @@ class BlockTest extends TestCase{
throw new \RuntimeException("Can't test registering new blocks because no unused spaces left");
}
/**
* Verifies that blocks with IDs larger than 255 can't be registered
*/
public function testRegisterIdTooLarge() : void{
self::expectException(\RuntimeException::class);
$this->blockFactory->register(new OutOfBoundsBlock(new BlockIdentifier(25555, 0), "Out Of Bounds Block", BlockBreakInfo::instant()));
}
/**
* Verifies that blocks with IDs smaller than 0 can't be registered
*/
public function testRegisterIdTooSmall() : void{
self::expectException(\RuntimeException::class);
self::expectException(\InvalidArgumentException::class);
$this->blockFactory->register(new OutOfBoundsBlock(new BlockIdentifier(-1, 0), "Out Of Bounds Block", BlockBreakInfo::instant()));
}