assertStatusGood( $status ); // should not throw! $status->throwErrorPageError(); } public function testBlock() { $status = PermissionStatus::newEmpty(); $this->assertNull( $status->getBlock() ); $block = $this->createMock( Block::class ); $status->setBlock( $block ); $this->assertSame( $block, $status->getBlock() ); $this->assertTrue( $status->isBlocked() ); $this->assertFalse( $status->isOK() ); } public function testRateLimitExceeded() { $status = PermissionStatus::newEmpty(); $this->assertFalse( $status->isRateLimitExceeded() ); $status->setRateLimitExceeded(); $this->assertTrue( $status->isRateLimitExceeded() ); } }