Sokil\Mongo\DocumentTest::testEmptyField PHP Method

testEmptyField() public method

public testEmptyField ( )
    public function testEmptyField()
    {
        $document = $this->collection->createDocument(array('field1' => 'value', 'field2' => null));
        $this->assertFalse(empty($document->field1));
        $this->assertTrue(empty($document->field2));
        $this->assertTrue(empty($document->fieldUnexisted));
    }
DocumentTest