709773ab5747 introduced this method, but its implementation
does not permit calls to __destruct. PHP documentation on destructors
says that they'll be called unconditionally, which makes using the
mock created with this method unusable for classes that implement
__destruct.
Bug: T231656
Change-Id: Icb4f978c78e726401d75627128c9c76f6f9afc87
*/
protected function createNoOpMock( $type ) {
$mock = $this->createMock( $type );
- $mock->expects( $this->never() )->method( $this->anything() );
+ $mock->expects( $this->never() )->method( $this->anythingBut( '__destruct' ) );
return $mock;
}
}