Sokil\Mongo\DocumentTest::testDefineId_AsMongoIdClass PHP Method

testDefineId_AsMongoIdClass() public method

    public function testDefineId_AsMongoIdClass()
    {
        $id = new \MongoId();
        $document = $this->collection->createDocument()->defineId($id);
        $this->assertEquals($id, $document->getId());
    }
DocumentTest