Commit 8130c365 authored by alexpott's avatar alexpott

Issue #3102903 by mondrake: MigrateExecutableMemoryExceededTest has mismatched...

Issue #3102903 by mondrake: MigrateExecutableMemoryExceededTest has mismatched argument type mock expectations (and fails in PHPUnit8)

(cherry picked from commit dda035c2)
parent 0bd9bf2d
......@@ -80,10 +80,14 @@ protected function runMemoryExceededTest($message, $memory_exceeded, $memory_usa
if ($message) {
$this->executable->message->expects($this->at(0))
->method('display')
->with($this->stringContains('reclaiming memory'));
->with($this->callback(function ($subject) {
return mb_stripos((string) $subject, 'reclaiming memory') !== FALSE;
}));
$this->executable->message->expects($this->at(1))
->method('display')
->with($this->stringContains($message));
->with($this->callback(function ($subject) use ($message) {
return mb_stripos((string) $subject, $message) !== FALSE;
}));
}
else {
$this->executable->message->expects($this->never())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment