isNotEqualTo() public method

public isNotEqualTo ( $value, $failMessage = null )
コード例 #1
0
ファイル: phpArray.php プロジェクト: andrewolobo/mpTracker
 public function testIsNotEqualTo()
 {
     $this->if($asserter = new sut($generator = new asserter\generator()))->then->exception(function () use($asserter) {
         $asserter->isNotEqualTo(array());
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Array is undefined')->if($asserter->setWith(array()))->then->object($asserter->isNotEqualTo(range(1, 2)))->isIdenticalTo($asserter)->if($asserter->setWith($array = range(1, 5)))->then->object($asserter->isNotEqualTo(array()))->isIdenticalTo($asserter)->if($asserter->integer)->then->object($asserter->isNotEqualTo(array()))->isIdenticalTo($asserter)->exception(function () use($asserter, $array) {
         $asserter->isNotEqualTo($array);
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s is equal to %s'), $asserter, $asserter->getTypeOf($array)))->if($asserter->integer[2])->then->object($asserter->isEqualTo(3))->isIdenticalTo($asserter)->object($asserter->isEqualTo(3)->isNotEqualTo(5))->isIdenticalTo($asserter)->if($diff = new diffs\variable())->then->exception(function () use($asserter, &$expectedValue) {
         $asserter->isEqualTo($expectedValue = rand(4, PHP_INT_MAX));
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s is not equal to %s'), $asserter->getTypeOf($asserter->getInnerValue()), $asserter->getTypeOf($expectedValue)) . PHP_EOL . $diff->setExpected($expectedValue)->setActual(3));
 }