Phockito::verify PHP Method

verify() static public method

Verify builder. Takes a mock instance and an optional number of times to verify against. Returns a DSL object that catches the method to verify
static public verify ( Phockito_Mock $mock, string $times = 1 ) : Phockito_VerifyBuilder
$mock Phockito_Mock - The mock instance to verify
$times string - The number of times the method should be called, either a number, or a number followed by "+"
return Phockito_VerifyBuilder
    static function verify($mock, $times = 1)
    {
        return new Phockito_VerifyBuilder($mock->__phockito_class, $mock->__phockito_instanceid, $times);
    }

Usage Example

 function testCanVerifyByType()
 {
     $mock = Phockito::mock('PhockitoHamcrestTest_MockMe');
     $mock->Bar('Pow!');
     $mock->Bar('Bam!');
     Phockito::verify($mock, 2)->Bar(stringValue());
 }
All Usage Examples Of Phockito::verify