/**
* @depends testBlocked
*/
public function testBlock()
{
$this->mockGoodReferer();
ob_start();
$goodReferer = \Nabble\Semalt::block();
$output = ob_get_clean();
$this->assertNull($goodReferer, 'Shouldn\'t return anything');
$this->assertEmpty($output, 'Shouldn\'t output anything');
$this->mockBadReferer();
ob_start();
$withoutAction = \Nabble\Semalt::block();
$output = ob_get_clean();
$explodedExplanation = explode('%s', \Nabble\Semalt::$explanation);
$this->assertNull($withoutAction, 'Shouldn\'t return anything');
$this->assertNotNull($output, 'Output shouldn\'t be null');
$this->assertContains($explodedExplanation[0], $output, 'Should contain explanation');
ob_start();
$withMessage = \Nabble\Semalt::block('TEST_MESSAGE');
$output = ob_get_clean();
$this->assertNull($withMessage, 'Shouldn\'t return anything');
$this->assertNotNull($output, 'Output shouldn\'t be null');
$this->assertContains('TEST_MESSAGE', $output, 'Should contain test message');
// @todo test headers
}