mirror of
https://github.com/elyby/php-tempmailbuster.git
synced 2025-05-31 14:11:41 +05:30
Initial commit: base git repo structure, base Storage implementation and tests
This commit is contained in:
29
tests/StorageTest.php
Normal file
29
tests/StorageTest.php
Normal 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());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user