summaryrefslogtreecommitdiffstats
path: root/tests/unit/fetcher/FeedFetcherTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-14 17:32:49 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-14 17:32:49 +0200
commit160a0dfebaeb21cc75d7166dfbac6d0ef1a51460 (patch)
tree28e2555c97462d60356ef933d5c71c5326649747 /tests/unit/fetcher/FeedFetcherTest.php
parentacc2df1251a1c1b9ec5ede13bdf46d516dc64b0d (diff)
convert array() to []
Diffstat (limited to 'tests/unit/fetcher/FeedFetcherTest.php')
-rw-r--r--tests/unit/fetcher/FeedFetcherTest.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/unit/fetcher/FeedFetcherTest.php b/tests/unit/fetcher/FeedFetcherTest.php
index 72a94f50a..1f1a3cce9 100644
--- a/tests/unit/fetcher/FeedFetcherTest.php
+++ b/tests/unit/fetcher/FeedFetcherTest.php
@@ -55,7 +55,7 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
protected function setUp(){
$this->core = $this->getMock(
- '\SimplePie_Core', array(
+ '\SimplePie_Core', [
'set_timeout',
'set_feed_url',
'enable_cache',
@@ -70,7 +70,7 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
'get_items',
'get_title',
'get_image_url'
- ));
+ ]);
$this->coreFactory = $this->getMockBuilder(
'\OCA\News\Utility\SimplePieAPIFactory')
->disableOriginalConstructor()
@@ -87,7 +87,7 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
->disableOriginalConstructor()
->getMock();
$this->time = 2323;
- $timeFactory = $this->getMock('TimeFactory', array('getTime'));
+ $timeFactory = $this->getMock('TimeFactory', ['getTime']);
$timeFactory->expects($this->any())
->method('getTime')
->will($this->returnValue($this->time));
@@ -243,14 +243,14 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
$item->setBody($this->body);
$item->setLastModified($this->time);
if($author) {
- $mock = $this->getMock('author', array('get_name'));
+ $mock = $this->getMock('author', ['get_name']);
$mock->expects($this->once())
->method('get_name')
->will($this->returnValue($this->author));
$this->expectItem('get_author', $mock);
$item->setAuthor(html_entity_decode($this->author));
} else {
- $mock = $this->getMock('author', array('get_name', 'get_email'));
+ $mock = $this->getMock('author', ['get_name', 'get_email']);
$mock->expects($this->any())
->method('get_name')
->will($this->returnValue(''));
@@ -263,7 +263,7 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
}
if($enclosureType === 'audio/ogg') {
- $mock = $this->getMock('enclosure', array('get_type', 'get_link'));
+ $mock = $this->getMock('enclosure', ['get_type', 'get_link']);
$mock->expects($this->any())
->method('get_type')
->will($this->returnValue($enclosureType));
@@ -312,10 +312,10 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
->will($this->returnValue(true));
$item = $this->createItem();
$feed = $this->createFeed();
- $this->expectCore('get_items', array($this->item));
+ $this->expectCore('get_items', [$this->item]);
$result = $this->fetcher->fetch($this->url);
- $this->assertEquals(array($feed, array($item)), $result);
+ $this->assertEquals([$feed, [$item]], $result);
}
@@ -334,10 +334,10 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
->method('init')
->will($this->returnValue(true));
$item = $this->createItem();
- $this->expectCore('get_items', array($this->item));
+ $this->expectCore('get_items', [$this->item]);
$result = $this->fetcher->fetch($this->url);
- $this->assertEquals(array($feed, array($item)), $result);
+ $this->assertEquals([$feed, [$item]], $result);
}
public function testFetchMapItemsAuthorExists(){
@@ -346,10 +346,10 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
->will($this->returnValue(true));
$item = $this->createItem(true);
$feed = $this->createFeed(true);
- $this->expectCore('get_items', array($this->item));
+ $this->expectCore('get_items', [$this->item]);
$result = $this->fetcher->fetch($this->url);
- $this->assertEquals(array($feed, array($item)), $result);
+ $this->assertEquals([$feed, [$item]], $result);
}
@@ -359,10 +359,10 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
->will($this->returnValue(true));
$item = $this->createItem(false, true);
$feed = $this->createFeed(false, true);
- $this->expectCore('get_items', array($this->item));
+ $this->expectCore('get_items', [$this->item]);
$result = $this->fetcher->fetch($this->url);
- $this->assertEquals(array($feed, array($item)), $result);
+ $this->assertEquals([$feed, [$item]], $result);
}
@@ -372,10 +372,10 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
->will($this->returnValue(true));
$item = $this->createItem(false, true, true);
$feed = $this->createFeed(false, true);
- $this->expectCore('get_items', array($this->item));
+ $this->expectCore('get_items', [$this->item]);
$result = $this->fetcher->fetch($this->url);
- $this->assertEquals(array($feed, array($item)), $result);
+ $this->assertEquals([$feed, [$item]], $result);
}
@@ -399,10 +399,10 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
->will($this->returnValue($this->webFavicon));
$item = $this->createItem(false, true);
- $this->expectCore('get_items', array($this->item));
+ $this->expectCore('get_items', [$this->item]);
$result = $this->fetcher->fetch($this->url);
- $this->assertEquals(array($feed, array($item)), $result);
+ $this->assertEquals([$feed, [$item]], $result);
}
public function testFetchMapItemsNoGetFavicon() {
@@ -423,10 +423,10 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
->method('fetch');
$item = $this->createItem(false, true);
- $this->expectCore('get_items', array($this->item));
+ $this->expectCore('get_items', [$this->item]);
$result = $this->fetcher->fetch($this->url, false);
- $this->assertEquals(array($feed, array($item)), $result);
+ $this->assertEquals([$feed, [$item]], $result);
}