/** * @expectedException \Joomla\ORM\Exception\OrmException */ public function testDeleteEmptyId() { $article = new Article(); $article->title = "Non-existant Article"; $article->teaser = "This article is not existant and has no id"; $article->body = "It serves test purposes only and should never go into the database."; $article->author = __METHOD__; $article->license = 'CC'; /** @noinspection PhpUndefinedFieldInspection */ $article->parent_id = 0; $this->repo->remove($article); $this->repo->commit(); }
/** * Persists all changes * * @return void */ public function commit() { $this->entityRepository->commit(); }
/** * @testdox commit() is a proxy for commit() on the unit of work */ public function testCommit() { $this->unitOfWork->expects($this->once())->method('commit'); $this->repo->commit(); }