Initial commit: base git repo structure, base Storage implementation and tests

This commit is contained in:
ErickSkrauch
2016-04-26 23:29:38 +03:00
commit f65846ad9b
8 changed files with 159 additions and 0 deletions

29
tests/StorageTest.php Normal file
View File

@ -0,0 +1,29 @@
<?php
namespace Ely\TempMailBuster;
class StorageTest extends \PHPUnit_Framework_TestCase
{
public function testGetBlackList()
{
$storage = new Storage(['item']);
$this->assertEquals(['item'], $storage->getBlacklist());
}
public function testAppendToBlacklist()
{
$storage = new Storage(['item1']);
$storage->appendToBlacklist(['item2']);
$this->assertEquals(['item1', 'item2'], $storage->getBlacklist());
$storage = new Storage(['item1']);
$storage->appendToBlacklist('item2');
$this->assertEquals(['item1', 'item2'], $storage->getBlacklist());
}
public function testSetBlacklist()
{
$storage = new Storage(['item1']);
$storage->setBlacklist(['item2']);
$this->assertEquals(['item2'], $storage->getBlacklist());
}
}