Skip to content

Commit

Permalink
fix(Organizations): unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TiSiE committed Jun 4, 2020
1 parent 52d5ff8 commit ffbce5c
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 4 deletions.
Expand Up @@ -6,7 +6,7 @@
* @license MIT
* @copyright 2013 - 2016 Cross Solution <http://cross-solution.de>
*/

/** */
namespace OrganizationsTest\Form;

Expand Down Expand Up @@ -61,7 +61,52 @@ public function testAllowObjectBinding()

public function testGetInputFilterSpec()
{
$this->assertSame($this->target->getInputFilterSpecification(), []);
$spec = [
'street' => [
'required' => false,
'filters' => [
['name' => 'StripTags']
],
],
'houseNumber' => [
'required' => false,
'filters' => [
['name' => 'StripTags']
],
],
'postalcode' => [
'required' => false,
'filters' => [
['name' => 'StripTags']
],
],
'city' => [
'required' => false,
'filters' => [
['name' => 'StripTags']
],
],
'country' => [
'required' => false,
'filters' => [
['name' => 'StripTags']
],
],
'phone' => [
'required' => false,
'filters' => [
['name' => 'StripTags']
],
],
'fax' => [
'required' => false,
'filters' => [
['name' => 'StripTags']
],
],
];

$this->assertSame($this->target->getInputFilterSpecification(), $spec);
}

public function testGetHydrator()
Expand Down
Expand Up @@ -6,7 +6,7 @@
* @license MIT
* @copyright 2013 - 2016 Cross Solution <http://cross-solution.de>
*/

/** */
namespace OrganizationsTest\Form;

Expand Down Expand Up @@ -50,7 +50,16 @@ public function testNameFormFields()

public function testGetInputFilterSpec()
{
$this->assertSame($this->target->getInputFilterSpecification(), []);
$spec = [
'description' => [
'required' => true,
'allow_empty' => true,
'filters' => [
['name' => 'StripTags'],
],
],
];
$this->assertSame($this->target->getInputFilterSpecification(), $spec);
}

public function testGetHydrator()
Expand Down

0 comments on commit ffbce5c

Please sign in to comment.