Since: 3.0.0
Author: Henry Ruhs
Author: Balázs Szilágyi
Inheritance: extends ControllerAbstract
Example #1
0
 /**
  * testProcess
  *
  * @since 3.0.0
  *
  * @param array $postArray
  * @param array $hashArray
  * @param array $userArray
  * @param string $expect
  *
  * @dataProvider providerProcess
  */
 public function testProcess($postArray = [], $hashArray = [], $userArray = [], $expect = null)
 {
     /* setup */
     Db::forTablePrefix('users')->whereIdIs(1)->findOne()->set('status', $userArray['status'])->save();
     $this->_request->set('post', $postArray);
     $this->_request->setPost('solution', function_exists('password_verify') ? $hashArray[0] : $hashArray[1]);
     $loginController = new Controller\Login($this->_registry, $this->_language, $this->_request);
     /* actual */
     $actual = $loginController->process();
     /* compare */
     $this->assertEquals($expect, $actual);
 }