From 964845af7d1e13e4bfcfba1e1e3953d6e6ad68d9 Mon Sep 17 00:00:00 2001 From: Jelle Sebreghts Date: Fri, 23 Sep 2016 11:51:24 +0200 Subject: [PATCH] Fix TheSportsDbTest. --- tests/src/TheSportsDbTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/src/TheSportsDbTest.php b/tests/src/TheSportsDbTest.php index 41aeea2..8d77e25 100644 --- a/tests/src/TheSportsDbTest.php +++ b/tests/src/TheSportsDbTest.php @@ -541,7 +541,7 @@ public function testGetEventsByDay() { foreach ($events as $event) { // Should be an event. $this->assertInstanceOf(EventInterface::class, $event); - $this->assertEquals($day->format('Y-m-d'), $event->getDate()); + $this->assertEquals($day->format('Y-m-d'), $event->getDate()->format('Y-m-d')); } $events = $this->db->getEventsByDay($day, 'Soccer'); @@ -550,7 +550,7 @@ public function testGetEventsByDay() { foreach ($events as $event) { // Should be an event. $this->assertInstanceOf(EventInterface::class, $event); - $this->assertEquals($day->format('Y-m-d'), $event->getDate()); + $this->assertEquals($day->format('Y-m-d'), $event->getDate()->format('Y-m-d')); $this->assertEquals('Soccer', $event->getLeague()->getSport()->getName()); } @@ -560,7 +560,7 @@ public function testGetEventsByDay() { foreach ($events as $event) { // Should be an event. $this->assertInstanceOf(EventInterface::class, $event); - $this->assertEquals($day->format('Y-m-d'), $event->getDate()); + $this->assertEquals($day->format('Y-m-d'), $event->getDate()->format('Y-m-d')); $this->assertEquals('English Premier League', $event->getLeague()->getName()); } @@ -570,7 +570,7 @@ public function testGetEventsByDay() { foreach ($events as $event) { // Should be an event. $this->assertInstanceOf(EventInterface::class, $event); - $this->assertEquals($day->format('Y-m-d'), $event->getDate()); + $this->assertEquals($day->format('Y-m-d'), $event->getDate()->format('Y-m-d')); $this->assertEquals('English Premier League', $event->getLeague()->getName()); $this->assertEquals('Soccer', $event->getLeague()->getSport()->getName()); }