Example #1
0
 /**
  * @param $email
  * @param $password
  *
  * @return bool
  */
 private function validate(string $email, string $password) : bool
 {
     return $this->validation->passes(['email' => $email, 'password' => $password], $this->validationRules);
 }
Example #2
0
 /**
  * @param string $email
  * @param string $password
  * @param bool   $pass
  */
 private function mockValidation(string $email = '', string $password = '', bool $pass = true)
 {
     $this->validation->expects($this->atLeastOnce())->method('passes')->with($email && $password ? compact('email', 'password') : $this->anything(), $this->anything())->willReturn($pass);
 }