isEmpty() public method

public isEmpty ( $failMessage = null )
示例#1
0
 public function testIsEmpty()
 {
     $this->assert->if($asserter = new asserters\phpArray($generator = new asserter\generator()))->then->boolean($asserter->wasSet())->isFalse()->exception(function () use($asserter) {
         $asserter->isEmpty();
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Array is undefined')->if($asserter->setWith(array(uniqid())))->then->exception(function () use($asserter) {
         $asserter->isEmpty();
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s is not empty'), $asserter))->if($asserter->setWith(array()))->then->object($asserter->isEmpty())->isIdenticalTo($asserter);
 }