Browse Source

delete getProp

master
Ilya Sigunov 13 years ago
parent
commit
6f36676183
  1. 15
      tests/form/FormTest.php

15
tests/form/FormTest.php

@ -52,11 +52,6 @@ class FormTest extends PHPUnit_Framework_TestCase
'password'=>'password' 'password'=>'password'
); );
$obj_fields = $form->getProp('fields');
$this->assertTrue(!$obj_fields['login']->isIgnored());
$this->assertTrue(!$obj_fields['password']->isIgnored());
$this->assertSame(1, $form->isValid($fields)); $this->assertSame(1, $form->isValid($fields));
$this->assertEquals($fields, $form->getValues()); $this->assertEquals($fields, $form->getValues());
@ -152,8 +147,6 @@ class FormTest extends PHPUnit_Framework_TestCase
$this->assertSame(0, $form->isValid($fields)); $this->assertSame(0, $form->isValid($fields));
$this->assertSame(0, $form->getProp('valid'));
$this->assertEquals('error', Form::ERROR); $this->assertEquals('error', Form::ERROR);
$this->assertEquals($form->getMessageType(), Form::ERROR); $this->assertEquals($form->getMessageType(), Form::ERROR);
@ -171,9 +164,9 @@ class FormTest extends PHPUnit_Framework_TestCase
$this->assertSame(1, $form->isValid($fields)); $this->assertSame(1, $form->isValid($fields));
$messages = $form->getProp('messages');
$form->setSuccessMessage('message');
$this->assertEquals($messages[Form::SUCCESS], $form->getMessage());
$this->assertEquals('message', $form->getMessage());
} }
@ -187,9 +180,9 @@ class FormTest extends PHPUnit_Framework_TestCase
$this->assertSame(0, $form->isValid($fields)); $this->assertSame(0, $form->isValid($fields));
$messages = $form->getProp('messages');//attributeEq ?
$form->setErrorMessage('message');
$this->assertEquals($messages[Form::ERROR], $form->getMessage());
$this->assertEquals('message', $form->getMessage());
} }

Loading…
Cancel
Save