public function testRemove() { $criteria = array('is_active' => false); $collection = $this->getMockBuilder('\\MongoDB\\Collection')->disableOriginalConstructor()->getMock(); $collection->expects($this->any())->method('remove')->with($criteria); $repository = new RepositoryMock($this->mandango); $repository->setCollection($collection); $repository->remove($criteria); }