Exemplo n.º 1
0
 public function testGetSecretKey()
 {
     $expected = '/[a-f0-9]+/';
     $this->assertNotEmpty($this->instance->getSecret());
     $this->assertRegExp($expected, $this->instance->getSecret());
     $this->assertEquals($this->instance->getSecret(), $this->instance->getServerKey());
 }
 /**
  * @return User
  */
 public function getUser()
 {
     if (!self::$user instanceof User) {
         $uid = uniqid() . '@domain';
         $user = new User();
         $user->setUsername($uid)->setPassword($uid)->setEmail($uid);
         $this->getEntityManager()->persist($user);
         $this->getEntityManager()->flush($user);
         self::$user = $user;
     }
     return self::$user;
 }