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'])); }