Successfully tested create, update and delete of trivial elements

This commit is contained in:
2019-05-23 17:52:11 +02:00
parent 23941f32d3
commit 8b25925ec4
5 changed files with 40 additions and 5 deletions

View File

@@ -14,6 +14,8 @@ class ClubsViewTest extends HtmlView
{
ToolbarHelper::title('Test');
$this->log = '';
$factory = new CommonClubsModelFactoryClub();
$this->clubs = $factory->loadElements();
@@ -27,6 +29,20 @@ class ClubsViewTest extends HtmlView
// $places[0]->setName("abc");
// $places[0]->save();
$pfactory = new CommonClubsModelFactoryPlace();
$np = $pfactory->createNew();
$np->setName('MyName');
$np->setClub($c);
//$np->save();
$np->getId();
$np = $c->getPlaces()[1];
$np->getName();
$np->setName('foo2 with new Name');
// $np->save();
// $np->delete();
$this->log = $np;
parent::display($tpl);
}