Sokil\Mongo\CollectionTest::testDeleteDocuments_ErrorDeletingDocuments PHP Method

testDeleteDocuments_ErrorDeletingDocuments() public method

    public function testDeleteDocuments_ErrorDeletingDocuments()
    {
        $this->collectionMock = $this->getMock('\\MongoCollection', array('remove'), array($this->database->getMongoDB(), 'phpmongo_test_collection'));
        $this->collectionMock->expects($this->once())->method('remove')->will($this->returnValue(array('ok' => (double) 0, 'err' => 'Some strange error')));
        $this->collection = new Collection($this->database, $this->collectionMock);
        $this->collection->createDocument(array('param' => 'value'))->save();
        $this->collection->deleteDocuments($this->collection->expression()->where('param', 'value'));
    }
CollectionTest