diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-14 17:32:49 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-14 17:32:49 +0200 |
commit | 160a0dfebaeb21cc75d7166dfbac6d0ef1a51460 (patch) | |
tree | 28e2555c97462d60356ef933d5c71c5326649747 /tests/unit/controller/FolderControllerTest.php | |
parent | acc2df1251a1c1b9ec5ede13bdf46d516dc64b0d (diff) |
convert array() to []
Diffstat (limited to 'tests/unit/controller/FolderControllerTest.php')
-rw-r--r-- | tests/unit/controller/FolderControllerTest.php | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/tests/unit/controller/FolderControllerTest.php b/tests/unit/controller/FolderControllerTest.php index 332b48bbe..af63aa959 100644 --- a/tests/unit/controller/FolderControllerTest.php +++ b/tests/unit/controller/FolderControllerTest.php @@ -65,18 +65,13 @@ class FolderControllerTest extends \PHPUnit_Framework_TestCase { public function testIndex(){ - $return = array( - new Folder(), - new Folder(), - ); + $return = [new Folder(), new Folder()]; $this->folderBusinessLayer->expects($this->once()) ->method('findAll') ->will($this->returnValue($return)); $response = $this->controller->index(); - $expected = array( - 'folders' => $return - ); + $expected = ['folders' => $return]; $this->assertEquals($expected, $response); } @@ -132,9 +127,7 @@ class FolderControllerTest extends \PHPUnit_Framework_TestCase { public function testCreate(){ - $result = array( - 'folders' => array(new Folder()) - ); + $result = ['folders' => [new Folder()]]; $this->folderBusinessLayer->expects($this->once()) ->method('purgeDeleted') @@ -212,9 +205,7 @@ class FolderControllerTest extends \PHPUnit_Framework_TestCase { public function testRename(){ - $result = array( - 'folders' => array(new Folder()) - ); + $result = ['folders' => [new Folder()]]; $this->folderBusinessLayer->expects($this->once()) ->method('rename') @@ -277,9 +268,7 @@ class FolderControllerTest extends \PHPUnit_Framework_TestCase { public function testRead(){ $feed = new Feed(); - $expected = array( - 'feeds' => array($feed) - ); + $expected = ['feeds' => [$feed]]; $this->itemBusinessLayer->expects($this->once()) ->method('readFolder') @@ -289,7 +278,7 @@ class FolderControllerTest extends \PHPUnit_Framework_TestCase { $this->feedBusinessLayer->expects($this->once()) ->method('findAll') ->with($this->equalTo($this->user)) - ->will($this->returnValue(array($feed))); + ->will($this->returnValue([$feed])); $response = $this->controller->read(4, 5); $this->assertEquals($expected, $response); |