mirror of
https://github.com/elyby/php-tempmailbuster.git
synced 2024-11-30 02:32:48 +05:30
30 lines
845 B
PHP
30 lines
845 B
PHP
<?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());
|
|
}
|
|
}
|