public function testSetWith() { $this->if($asserter = new sut($generator = new asserter\generator()))->and($mockController = new atoum\mock\controller())->and($mockController->__construct = function () { throw new \reflectionException(); })->and($asserter->setReflectionClassInjector(function ($class) use($mockController) { return new \mock\reflectionClass($class, $mockController); }))->and($class = uniqid())->then->exception(function () use($asserter, $class) { $asserter->setWith($class); })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('Class \'%s\' does not exist'), $class))->if($asserter = new sut($generator = new asserter\generator()))->then->object($asserter->setWith(__CLASS__))->isIdenticalTo($asserter)->string($asserter->getClass())->isEqualTo(__CLASS__); }
public function setWithTest(atoum\test $test) { parent::setWith($test->getTestedClassName()); return parent::setWithTest($test); }