container = $app->getContainer(); $this->itemMapper = $this->container->query('ItemMapper'); } public function testInsert() { $item = new Item(); $item->setTitle('my title'); $created = $this->itemMapper->insert($item); $fetched = $this->itemMapper->find($created->getId(), $this->userId); $this->assertEquals($item->getTitle(), $fetched->getTitle()); } }