Example #1
0
 /**
  * Tests that out of order items validate with multiple calls.
  */
 public function testOutOfOrderValidationWithMultipleCalls()
 {
     $position1 = array(new Phake_CallRecorder_Position(1));
     $position2 = array(new Phake_CallRecorder_Position(3));
     $position3 = array(new Phake_CallRecorder_Position(2), new Phake_CallRecorder_Position(4));
     $this->assertTrue($this->verifier->verifyCallsInOrder(array($position1, $position2, $position3)));
 }
Example #2
0
File: Phake.php Project: kore/Phake
 /**
  * Allows verification of methods in a particular order
  */
 public static function inOrder()
 {
     $calls = func_get_args();
     $orderVerifier = new Phake_CallRecorder_OrderVerifier();
     if (!$orderVerifier->verifyCallsInOrder(self::pullPositionsFromCallInfos($calls))) {
         $result = new Phake_CallRecorder_VerifierResult(false, array(), "Calls not made in order");
         self::getClient()->processVerifierResult($result);
     }
 }