Browse Source

Use assertEquals()

master
Vyacheslav Agafonov 13 years ago
parent
commit
1a1ccabcd3
  1. 7
      tests/form/FormTest.php

7
tests/form/FormTest.php

@ -27,11 +27,10 @@ class FormTest extends PHPUnit_Framework_TestCase
$stub = $this->getMockForAbstractClass('Form');
$method = new ReflectionMethod('Form', 'addField');
$method->setAccessible(true);
$return_object = $method->invokeArgs($stub, array('login'));
$this->assertInstanceOf('FormField', $return_object);
$this->assertSame($form_field, $return_object);
$this->assertEquals($form_field, $return_object);
}
public function testAddFieldWithMessage()
@ -41,10 +40,10 @@ class FormTest extends PHPUnit_Framework_TestCase
$stub = $this->getMockForAbstractClass('Form');
$method = new ReflectionMethod('Form', 'addField');
$method->setAccessible(true);
$return_object = $method->invokeArgs($stub, array('login', $message));
$this->assertInstanceOf('FormField', $return_object);
$this->assertSame($form_field, $return_object);
$this->assertEquals($form_field, $return_object);
$this->assertAttributeEquals($message, 'default_message', $return_object);
}

Loading…
Cancel
Save