Sokil\Mongo\CursorTest::testSkipSpecifiedFields PHP Method

testSkipSpecifiedFields() public method

    public function testSkipSpecifiedFields()
    {
        // create new document
        $documentId = $this->collection->createDocument(array('a' => 'a1', 'b' => 'b1', 'c' => 'c1', 'd' => 'd1'))->save()->getId();
        // fild some fields of document
        $document = $this->collection->find()->skipFields(array('a', 'c'))->skipField('b')->findOne()->toArray();
        $this->assertEquals(array('d' => 'd1', '_id' => $documentId), $document);
    }