mageekguy\atoum\asserters\extension::setWith PHP Method

setWith() public method

public setWith ( $name )
    public function setWith($name)
    {
        $this->name = $name;
        return $this;
    }

Usage Example

Beispiel #1
0
 public function testIsLoaded()
 {
     $this->if($asserter = new sut(new asserter\generator()))->then->exception(function () use($asserter) {
         $asserter->isLoaded();
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Name of PHP extension is undefined')->if($asserter->setAdapter($adapter = new atoum\test\adapter()))->and($adapter->extension_loaded = false)->and($asserter->setWith($extensionName = uniqid()))->then->exception(function () use($asserter) {
         $asserter->isLoaded();
     })->isInstanceOf('mageekguy\\atoum\\test\\exceptions\\skip')->hasMessage('PHP extension \'' . $extensionName . '\' is not loaded')->if($adapter->extension_loaded = true)->then->object($asserter->isLoaded())->isIdenticalTo($asserter);
 }