mageekguy\atoum\tests\units\test\adapter::test__unset PHP Méthode

test__unset() public méthode

public test__unset ( )
        public function test__unset()
        {
            $this->if($adapter = new testedClass())->then->array($adapter->getInvokers())->isEmpty()->array($adapter->getCalls()->toArray())->isEmpty()->when(function () use($adapter) {
                unset($adapter->md5);
            })->array($adapter->getInvokers())->isEmpty()->array($adapter->getCalls()->toArray())->isEmpty()->when(function () use($adapter) {
                unset($adapter->MD5);
            })->array($adapter->getInvokers())->isEmpty()->array($adapter->getCalls()->toArray())->isEmpty()->when(function () use($adapter) {
                $adapter->md5 = uniqid();
                $adapter->md5(uniqid());
            })->array($adapter->getInvokers())->isNotEmpty()->array($adapter->getCalls()->toArray())->isNotEmpty()->when(function () use($adapter) {
                unset($adapter->{uniqid()});
            })->array($adapter->getInvokers())->isNotEmpty()->array($adapter->getCalls()->toArray())->isNotEmpty()->when(function () use($adapter) {
                unset($adapter->md5);
            })->array($adapter->getInvokers())->isEmpty()->array($adapter->getCalls()->toArray())->isEmpty()->when(function () use($adapter) {
                $adapter->MD5 = uniqid();
                $adapter->MD5(uniqid());
            })->array($adapter->getInvokers())->isNotEmpty()->array($adapter->getCalls()->toArray())->isNotEmpty()->when(function () use($adapter) {
                unset($adapter->{uniqid()});
            })->array($adapter->getInvokers())->isNotEmpty()->array($adapter->getCalls()->toArray())->isNotEmpty()->when(function () use($adapter) {
                unset($adapter->MD5);
            })->array($adapter->getInvokers())->isEmpty()->array($adapter->getCalls()->toArray())->isEmpty();
        }