public function testIsolatedWrites() { $dao = new LiskIsolationTestDAO(); $this->assertEqual(null, $dao->getID(), 'Expect no ID.'); $this->assertEqual(null, $dao->getPHID(), 'Expect no PHID.'); $dao->save(); // Effects insert $id = $dao->getID(); $phid = $dao->getPHID(); $this->assertEqual(true, (bool) $id, 'Expect ID generated.'); $this->assertEqual(true, (bool) $phid, 'Expect PHID generated.'); $dao->save(); // Effects update $this->assertEqual($id, $dao->getID(), 'Expect ID unchanged.'); $this->assertEqual($phid, $dao->getPHID(), 'Expect PHID unchanged.'); }
public function testEphemeral() { $dao = new LiskIsolationTestDAO(); $dao->save(); $dao->makeEphemeral(); $this->tryTestCases(array($dao), array(false), array($this, 'saveDAO')); }