-
Notifications
You must be signed in to change notification settings - Fork 87
Conversation
test/Element/MonthTest.php
Outdated
@@ -17,6 +17,7 @@ class MonthTest extends TestCase | |||
public function testProvidesInputSpecificationThatIncludesValidatorsBasedOnAttributes() | |||
{ | |||
$element = new MonthElement('foo'); | |||
$element->setFormat('Y-m'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The format setting is wrong, because the Month
element has already this format. (See also #170)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected $format = self::DATETIME_FORMAT;
is missing in Zend\Form\Element\Month
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I noticed that, I had to set the format due to the missing field. Was in kinda of a rush.
test/Element/MonthTest.php
Outdated
@@ -17,6 +17,7 @@ class MonthTest extends TestCase | |||
public function testProvidesInputSpecificationThatIncludesValidatorsBasedOnAttributes() | |||
{ | |||
$element = new MonthElement('foo'); | |||
$element->setFormat('Y-m'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected $format = self::DATETIME_FORMAT;
is missing in Zend\Form\Element\Month
…onger set the format for the Element\Month.
Related to #168 |
Element\DateTime format fix
Thanks, @Kwido |
The static format is now being used rendering the set format useless.