Mock Object library for PHPUnit PHPUnit_MockObject is a PHPUnit extension that provides Mock Objects for PHPUnit. According to the PHPUnit manual "The practice of replacing an object with a test double that verifies expectations, for instance asserting that a method has been called, is refered to as mocking.". PHPUnit is a unit testing suite for the PHP language, modelled on the xUnit testing framework.