creating a test to Strategy and DateComparator refactored

This commit is contained in:
Antonio Spinelli
2014-03-21 14:21:23 -03:00
parent b0b0d4a1a4
commit 71d894e103
3 changed files with 72 additions and 23 deletions

View File

@@ -12,8 +12,8 @@ class DateComparator implements ComparatorInterface
*/
public function compare($a, $b)
{
$aDate = strtotime($a['date']);
$bDate = strtotime($b['date']);
$aDate = new \DateTime($a['date']);
$bDate = new \DateTime($b['date']);
if ($aDate == $bDate) {
return 0;