Sokil\Mongo\PersistenceTest::testClear PHP Method

testClear() public method

public testClear ( Sokil\Mongo\Persistence $persistence )
$persistence Sokil\Mongo\Persistence
    public function testClear(Persistence $persistence)
    {
        $document = $this->collection->createDocument(array('param' => 'value'));
        // add document
        $persistence->persist($document);
        // clear documents
        $persistence->clear();
        $this->assertEquals(0, count($persistence));
    }