isEqualTo() public method

public isEqualTo ( call $call )
$call call
Exemplo n.º 1
0
 public function testIsEqualTo()
 {
     $this->if($call1 = new testedClass())->and($call2 = new testedClass())->then->boolean($call1->isEqualTo($call2))->isFalse()->boolean($call2->isEqualTo($call1))->isFalse()->if($call1 = new testedClass(uniqid()))->then->boolean($call1->isEqualTo($call2))->isFalse()->boolean($call2->isEqualTo($call1))->isFalse()->if($call2 = new testedClass(uniqid()))->then->boolean($call1->isEqualTo($call2))->isFalse()->boolean($call2->isEqualTo($call1))->isFalse()->if($call1 = new testedClass())->then->boolean($call1->isEqualTo($call2))->isFalse()->boolean($call2->isEqualTo($call1))->isFalse()->if($call1 = new testedClass($function = uniqid()))->and($call2 = new testedClass($function))->then->boolean($call1->isEqualTo($call2))->isTrue()->boolean($call2->isEqualTo($call1))->isTrue()->if($call2 = new testedClass(strtoupper($function)))->then->boolean($call1->isEqualTo($call2))->isTrue()->boolean($call2->isEqualTo($call1))->isTrue()->if($call1 = new testedClass($function, array()))->then->boolean($call1->isEqualTo($call2))->isFalse()->boolean($call2->isEqualTo($call1))->isTrue()->if($call2 = new testedClass($function, array()))->then->boolean($call1->isEqualTo($call2))->isTrue()->boolean($call2->isEqualTo($call1))->isTrue()->if($call1 = new testedClass($function, array($argument = uniqid())))->then->boolean($call1->isEqualTo($call2))->isFalse()->boolean($call2->isEqualTo($call1))->isFalse()->if($call2 = new testedClass($function, array($argument)))->then->boolean($call1->isEqualTo($call2))->isTrue()->boolean($call2->isEqualTo($call1))->isTrue()->if($call1 = new testedClass($function, $arguments = array(uniqid(), uniqid())))->then->boolean($call1->isEqualTo($call2))->isFalse()->boolean($call2->isEqualTo($call1))->isFalse()->if($call2 = new testedClass($function, $arguments))->then->boolean($call1->isEqualTo($call2))->isTrue()->boolean($call2->isEqualTo($call1))->isTrue()->if($call1 = new testedClass($function, $arguments = array($arg1 = uniqid(), $arg2 = uniqid(), $arg3 = new \mock\object())))->then->boolean($call1->isEqualTo($call2))->isFalse()->boolean($call2->isEqualTo($call1))->isFalse()->if($call2 = new testedClass($function, $arguments))->then->boolean($call1->isEqualTo($call2))->isTrue()->boolean($call2->isEqualTo($call1))->isTrue()->if($call2 = new testedClass($function, array($arg1, $arg2, clone $arg3)))->then->boolean($call1->isEqualTo($call2))->isTrue()->boolean($call2->isEqualTo($call1))->isTrue()->if($call2 = new testedClass($function, array($arg3, $arg2, $arg1)))->then->boolean($call1->isEqualTo($call2))->isFalse()->boolean($call2->isEqualTo($call1))->isFalse()->if($call1 = new testedClass($function = uniqid(), array($arg1 = uniqid(), $arg2 = uniqid(), $arg3 = new \mock\object())))->and($call2 = new testedClass($function, array($arg1, $arg2)))->then->boolean($call1->isEqualTo($call2))->isFalse()->boolean($call2->isEqualTo($call1))->isTrue()->if($call1 = new testedClass($function))->and($call2 = new testedClass($function, array($object = new \mock\object())))->then->boolean($call1->isEqualTo($call2))->isTrue()->boolean($call2->isEqualTo($call1))->isFalse();
 }