|
|
@ -93,7 +93,6 @@ class FormTest extends PHPUnit_Framework_TestCase |
|
|
|
$this->assertEquals($fields, $form->getValues()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function testGetValueCorrect() |
|
|
|
{ |
|
|
|
$form = new NotEmptyForm(); |
|
|
@ -106,7 +105,6 @@ class FormTest extends PHPUnit_Framework_TestCase |
|
|
|
$this->assertEquals($fields['password'], $form->getValue('password')); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function testGetValueMissing() |
|
|
|
{ |
|
|
|
$form = new NotEmptyForm(); |
|
|
@ -118,7 +116,6 @@ class FormTest extends PHPUnit_Framework_TestCase |
|
|
|
$this->assertEquals('', $form->getValue('password')); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function testGetValueMissingFieldLogin() |
|
|
|
{ |
|
|
|
$form = new NotEmptyForm(); |
|
|
@ -130,7 +127,6 @@ class FormTest extends PHPUnit_Framework_TestCase |
|
|
|
$this->assertEquals('', $form->getValue('passwordw')); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function testGetValueMissingFieldPassword() |
|
|
|
{ |
|
|
|
$form = new NotEmptyForm(); |
|
|
@ -166,7 +162,6 @@ class FormTest extends PHPUnit_Framework_TestCase |
|
|
|
$this->assertEquals($form->getMessageType(), Form::ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function testGetMessageCorrect() |
|
|
|
{ |
|
|
|
$form = new NotEmptyForm(); |
|
|
@ -179,7 +174,6 @@ class FormTest extends PHPUnit_Framework_TestCase |
|
|
|
$this->assertEquals('message', $form->getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function testGetMessageMissing() |
|
|
|
{ |
|
|
|
$form = new NotEmptyForm(); |
|
|
@ -191,7 +185,6 @@ class FormTest extends PHPUnit_Framework_TestCase |
|
|
|
$this->assertEquals('message', $form->getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function testSetSuccessMessage() |
|
|
|
{ |
|
|
|
$form = new NotEmptyForm(); |
|
|
@ -234,32 +227,3 @@ class NotEmptyForm extends Form |
|
|
|
$this->addField('password')->addValidator($validator); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
class NullForm extends Form |
|
|
|
{ |
|
|
|
public function init() |
|
|
|
{ |
|
|
|
/**/ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class FooTest extends PHPUnit_Framework_TestCase |
|
|
|
{ |
|
|
|
/** |
|
|
|
* @covers Foo::doSomethingPrivate |
|
|
|
*/ |
|
|
|
public function testPrivateMethod() |
|
|
|
{ |
|
|
|
$method = new ReflectionMethod( |
|
|
|
'Foo', 'doSomethingPrivate' |
|
|
|
); |
|
|
|
|
|
|
|
$method->setAccessible(TRUE); |
|
|
|
|
|
|
|
$this->assertEquals( |
|
|
|
'blah', $method->invoke(new Foo) |
|
|
|
); |
|
|
|
} |
|
|
|
} |