Пример #1
0
 public function testGetExtensionConfiguration()
 {
     $this->if($test = new emptyTest(), $extension = new \mock\mageekguy\atoum\extension())->then->variable($test->getExtensionConfiguration($extension))->isNull->if($test->addExtension($extension))->then->variable($test->getExtensionConfiguration($extension))->isNull->given($configuration = new \mock\mageekguy\atoum\extension\configuration())->if($test->addExtension($extension, $configuration))->then->object($test->getExtensionConfiguration($extension))->isIdenticalTo($configuration);
 }
Пример #2
0
 public function testRemoveExtensions()
 {
     $this->if($test = new emptyTest())->then->array($test->getExtensions())->isEmpty()->array($test->getObservers())->isEmpty()->object($test->removeExtensions())->isIdenticalTo($test)->array($test->getExtensions())->isEmpty()->array($test->getObservers())->isEmpty()->if($extension = new \mock\mageekguy\atoum\extension())->and($otherExtension = new \mock\mageekguy\atoum\extension())->and($test->addExtension($extension)->addExtension($otherExtension))->then->array($test->getExtensions())->isEqualTo(array($extension, $otherExtension))->array($test->getObservers())->isEqualTo(array($extension, $otherExtension))->object($test->removeExtensions())->isIdenticalTo($test)->array($test->getExtensions())->isEmpty()->array($test->getObservers())->isEmpty();
 }