Skip to content

Commit

Permalink
Fix testValidDateDottedLittleEndianWithLeadingZeros
Browse files Browse the repository at this point in the history
  • Loading branch information
kblomqvist committed May 1, 2011
1 parent 0975663 commit 46b464c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Expand Up @@ -7,5 +7,5 @@
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(TESTS_PATH . '/../library'),
get_include_path(),
get_include_path(),
)));
5 changes: 3 additions & 2 deletions tests/library/Kblom/Validate/DatetimeTest.php
Expand Up @@ -117,11 +117,11 @@ public function testValidDateDashedLittleEndianWithLeadingZeros()
/** @group lendian */
public function testValidDateDottedLittleEndianWithLeadingZeros()
{
$date = '29.4.2011';
$date = '29.04.2011';
$result = $this->_validator->isValid($date);

$this->assertTrue($result);
$this->assertEquals('j.n.Y', $this->_validator->getMatchedFormat());
$this->assertEquals('d.m.Y', $this->_validator->getMatchedFormat());
}

// Big endian date formats
Expand Down Expand Up @@ -182,6 +182,7 @@ public function testInvalidDateFormat()
$errors = $this->_validator->getErrors();

$this->assertFalse($result);
$this->assertNull($this->_validator->getMatchedFormat());
$this->assertEquals(1, count($errors));
$this->assertEquals('invalidFormat', $errors[0]);
}
Expand Down

0 comments on commit 46b464c

Please sign in to comment.