From 5f76faeb1cdfe66c4bd1706ac60d4aceba6f865e Mon Sep 17 00:00:00 2001 From: Dominik Liebler Date: Thu, 18 Jul 2013 11:36:41 +0200 Subject: [PATCH] PHP 5.3 compatibility --- Tests/DataMapper/UserMapperTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tests/DataMapper/UserMapperTest.php b/Tests/DataMapper/UserMapperTest.php index 15b0459..9b00a9f 100644 --- a/Tests/DataMapper/UserMapperTest.php +++ b/Tests/DataMapper/UserMapperTest.php @@ -63,7 +63,7 @@ class UserMapperTest extends \PHPUnit_Framework_TestCase */ public function testRestoreOne(User $existing) { - $rows = new \ArrayIterator([['userid' => 1, 'username' => 'Odysseus', 'email' => 'Odysseus@ithaca.gr']]); + $rows = new \ArrayIterator(array(array('userid' => 1, 'username' => 'Odysseus', 'email' => 'Odysseus@ithaca.gr'))); $this->dbal->expects($this->once()) ->method('find') ->with(1) @@ -78,13 +78,13 @@ class UserMapperTest extends \PHPUnit_Framework_TestCase */ public function testRestoreMulti(User $existing) { - $rows = [['userid' => 1, 'username' => 'Odysseus', 'email' => 'Odysseus@ithaca.gr']]; + $rows = array(array('userid' => 1, 'username' => 'Odysseus', 'email' => 'Odysseus@ithaca.gr')); $this->dbal->expects($this->once()) ->method('findAll') ->will($this->returnValue($rows)); $user = $this->mapper->findAll(); - $this->assertEquals([$existing], $user); + $this->assertEquals(array($existing), $user); } /** @@ -96,7 +96,7 @@ class UserMapperTest extends \PHPUnit_Framework_TestCase $this->dbal->expects($this->once()) ->method('find') ->with(404) - ->will($this->returnValue([])); + ->will($this->returnValue(array())); $user = $this->mapper->findById(404); }