Inheritance: extends Symfony\Bundle\FrameworkBundle\Test\WebTestCase, use trait ContainerHelperTrait
Example #1
0
 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']);
 }
Example #2
0
 public function setUp()
 {
     parent::setUp();
     $this->login();
 }
Example #3
0
 public function setUp()
 {
     parent::setUp();
     $this->removeFiles();
 }