mageekguy\atoum\tests\units\asserters\dateTime::testSetWith PHP Method

testSetWith() public method

public testSetWith ( )
        public function testSetWith()
        {
            $this->given($asserter = $this->newTestedInstance->setLocale($locale = new \mock\atoum\locale()))->then->object($asserter->setWith($value = new \DateTime()))->isIdenticalTo($asserter)->object($asserter->getValue())->isIdenticalTo($value)->object($asserter->setWith($value = uniqid(), false))->isIdenticalTo($asserter)->string($asserter->getValue())->isEqualTo($value)->if($this->calling($locale)->_ = $notDatetime = uniqid())->then->exception(function () use($asserter, &$value) {
                $asserter->setWith($value = uniqid());
            })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage($notDatetime)->mock($locale)->call('_')->withArguments('%s is not an instance of \\dateTime', $asserter)->once->string($asserter->getValue())->isEqualTo($value);
        }