Sokil\Mongo\PersistenceTest::testPersist PHP Метод

testPersist() публичный Метод

public testPersist ( Sokil\Mongo\Persistence $persistence )
$persistence Sokil\Mongo\Persistence
    public function testPersist(Persistence $persistence)
    {
        $document = $this->collection->createDocument(array('param' => 'value'));
        $this->assertFalse($persistence->contains($document));
        // add document
        $persistence->persist($document);
        // check if document in persistence
        $this->assertTrue($persistence->contains($document));
    }