public function testGetReturnsBlockOnExistingFile() { $identifier = new Identifier('test', 'isblocked'); $block = new Block($identifier, $this->ownerMock->reveal(), new \DateTime()); $this->adapter->write($block); $result = $this->adapter->get($identifier); $this->assertNotNull($result); $this->assertInstanceOf('Brainbits\\Blocking\\Block', $result); }
public function testGetBlockReturnsBlockOnExistingBlock() { $blocker = new Blocker($this->getExistingAdapterMock()->reveal(), $this->ownerMock->reveal(), $this->getValidValidatorMock()->reveal()); $result = $blocker->getBlock($this->identifierMock->reveal()); $this->assertInstanceOf(BlockInterface::class, $result); }