Use assertEquals()
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user