Code: Select all
$this->mapper->expectArguments('delete', array(&$captcha1));
$this->mapper->expectArguments('delete', array(&$captcha2));So I ended up using expectArgumentsAt(). However, the UnitOfWork doesn't apply any particular logic on which order the captcha objects are passed to the mapper (it just so turned out that captcha1 came before captcha2). Which means a brittle testcase.
If you had to have this sort of testcase, what would you do? I have a sneaking suspicion that the solution is a custom Expectation class, but I'm not sure. What would you do?