/** * @covers Paradox\Client::resume */ public function testResume() { $this->client->begin(); $document = $this->client->dispense($this->collectionName); $document->set('name', 'john smith'); $id1 = $this->client->store($document); $this->assertNull($id1, "Id should be null, since methods can't return things in a transaction"); $this->client->pause(); $document2 = $this->client->dispense($this->collectionName); $document2->set('name', 'john smith'); $id2 = $this->client->store($document2); $this->assertNotNull($id2, "Id should not be null, since it is outside a transaction"); $this->client->resume(); $document3 = $this->client->dispense($this->collectionName); $document3->set('name', 'john smith'); $id3 = $this->client->store($document3); $this->assertNull($id3, "Id should be null, since methods can't return things in a transaction"); }