/** * @dataProvider persistanceInstanceProvider */ public function testDetach(Persistence $persistence) { $document = $this->collection->createDocument(array('param' => 'value')); $this->assertFalse($persistence->contains($document)); // attach document $persistence->persist($document); // check if document in persistence $this->assertTrue($persistence->contains($document)); // detach document $persistence->detach($document); // check if document in persistence $this->assertFalse($persistence->contains($document)); }