rMW709773ab5747: createNoOpMock() method for PHPUnit tests is awesome, but causes issues when mocking a class that implement __destruct. According to the documentation about destructors these will be called as soon as there are no other references to a particular object. I.E. unconditionally.
MovePageTest did include this; it had
$mock->expects( $this->never() )->method( $this->anythingBut( '__destruct' ) );
$mock->expects( $this->never() )->method( $this->anything() );
found in MediaWikiTestCaseTrait::creatNoOpMock.