Example #1
0
 public function testLoginWithInValidFilter()
 {
     $data = ['login' => 'a', 'password' => 'p'];
     $filter = new LoginFormInputFilter();
     $filter->setData($data);
     $this->setExpectedException('LogicException', 'Form is not valid');
     $this->testedObject->login($filter);
 }
 /**
  * @dataProvider dataProviderForTestPasswordElementByValue
  *
  * @param array $value
  * @param bool  $expectedResult
  */
 public function testPasswordElementByValue($value, $expectedResult)
 {
     $input = $this->testedObj->get('password');
     $input->setValue($value);
     $result = $input->isValid();
     $this->assertSame($expectedResult, $result);
 }