public function setUp() { parent::setUp(); UserQuery::create()->filterById(1, Criteria::GREATER_THAN)->delete(); GroupQuery::create()->filterById(1, Criteria::GREATER_THAN)->delete(); if ($this->testGroupPk) { return; } $this->testGroupPk = $this->getObjects()->add('jarves/group', ['name' => 'TestGroup']); $this->userPk = $this->getObjects()->add('jarves/user', ['username' => 'test', 'password' => 'test', 'activate' => true, 'email' => 'test@localhost', 'groups' => [$this->testGroupPk['id']]]); $user = $this->getObjects()->get('jarves/user', $this->userPk['id']); $this->assertEquals(1, count($user['groups'])); $this->assertEquals($this->testGroupPk['id'], $user['groups'][0]['id']); }
public function setUp() { parent::setUp(); $this->login(); }
public function setUp() { parent::setUp(); $this->removeFiles(); }