about me about me
photography photography
software projects software projects
contact me contact me

I occasionally need the list of method parameter matchers when setting assertions via mocks using with(). A completely useless example:


I can see a few documented in the examples but the most conclusive list I’ve come across is from slide 11 of these Advanced PHPUnit Testing slides. So I am posting them here, if only for my own use:

$this->equalTo($value, $delta, $maxDepth)
$this->stringContains($string, $case)


Mihailo Joksimovic // 24.Jun.2012 // 22:39

Thanks !

Thiago // 05.Dec.2012 // 20:55

Thanks +!

Andrew Zavadsky // 10.Jan.2013 // 15:43

Also you can use:


Matt // 10.Oct.2013 // 14:53


Alwin // 23.Jan.2014 // 09:25

a full List is available in the source code itself: