diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 6d22827..dda8d30 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -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(), ))); diff --git a/tests/library/Kblom/Validate/DatetimeTest.php b/tests/library/Kblom/Validate/DatetimeTest.php index 9b175e2..f355a29 100644 --- a/tests/library/Kblom/Validate/DatetimeTest.php +++ b/tests/library/Kblom/Validate/DatetimeTest.php @@ -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 @@ -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]); }