Ejemplo n.º 1
0
 public function testGeneratePasswordAction()
 {
     $result = $this->controller->generatePasswordAction(array());
     $this->assertTrue(is_array($result));
     $this->assertArrayHasKey('success', $result);
     $this->assertTrue($result['success']);
     $this->assertArrayHasKey('result', $result);
     $this->assertTrue(is_array($result['result']));
     $this->assertEquals(1, count($result['result']));
     $this->assertArrayHasKey('plainPassword', $result['result']);
     $this->assertGreaterThan(0, strlen($result['result']['plainPassword']));
 }
Ejemplo n.º 2
0
 /**
  * @return UsersController
  */
 private function getController()
 {
     $controller = new UsersController();
     $controller->setContainer(static::$container);
     return $controller;
 }