This commit is contained in:
Ilya Sigunov
2011-10-21 11:45:37 +04:00
parent acb3b8bf27
commit 8aa83f5124
3 changed files with 35 additions and 40 deletions

View File

@ -34,33 +34,33 @@ class FormViewHelperTest extends PHPUnit_Framework_TestCase
public function testForm2()
{
$this->assertNull($this->assertAttributeEquals(null,'data',$this->form));
$this->assertNull($this->assertAttributeEquals(null, 'data', $this->form));
$this->setExpectedException('Exception');
$this->form->form(null);
}
public function testForm1()
{
$this->assertNull($this->assertAttributeEquals(null,'data',$this->form)); //аналог getProp
$this->assertNull($this->assertAttributeEquals(null, 'data', $this->form)); //аналог getProp
$this->form->form('path');
}
public function testValueIsset()
{
$this->form->form('path');
$this->assertEquals('path', $this->form->value('path'));
$this->assertEquals(htmlentities('path', ENT_QUOTES, 'UTF-8'), $this->form->value('path'));
}
public function testValueNotIsset()
{
$this->form->form('path');
$this->assertEquals('param2', $this->form->value('param1','param2'));
$this->assertEquals(htmlentities('param2', ENT_QUOTES, 'UTF-8'), $this->form->value('param1','param2'));
}
public function testMessageIsset()
{
$this->form->form('path');
$this->assertNotEmpty($this->form->message('path'));
$this->assertEquals('<span class="error">' . htmlentities('path', ENT_QUOTES, 'UTF-8') . '</span>', $this->form->message('path'));
}
public function testMessageNotIsset()