Skip to content

Commit 8e15ba3

Browse files
committed
Fix coding style on PHPUnit test case.
- Use newer array syntax. - Consistent line break.
1 parent f849676 commit 8e15ba3

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

tests/SitemapTest.php

+8-10
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ public function setUp()
99
parent::setUp();
1010

1111
// config
12-
$config = array(
13-
'use_cache' => false,
14-
'cache_key' => 'Laravel.Sitemap.',
15-
'cache_duration' => 3600,
16-
);
12+
$config = [
13+
'use_cache' => false,
14+
'cache_key' => 'Laravel.Sitemap.',
15+
'cache_duration' => 3600,
16+
];
1717

1818
$this->sitemap = new Roumen\Sitemap\Sitemap($config);
1919
}
2020

2121
public function testSitemapAdd()
2222
{
23-
$this->sitemap->add('TestLoc','2014-02-29 00:00:00', 0.95, 'weekly', array(array("url"=>"test.png"),array("url"=>"<&>")), 'TestTitle');
23+
$this->sitemap->add('TestLoc','2014-02-29 00:00:00', 0.95, 'weekly', [["url" => "test.png"], ["url" => "<&>"]], 'TestTitle');
2424

2525
$items = $this->sitemap->model->getItems();
2626

@@ -30,9 +30,8 @@ public function testSitemapAdd()
3030
$this->assertEquals('2014-02-29 00:00:00', $items[0]['lastmod']);
3131
$this->assertEquals('0.95', $items[0]['priority']);
3232
$this->assertEquals('weekly', $items[0]['freq']);
33-
$this->assertEquals(array(array("url"=>"test.png"),array("url"=>"&lt;&amp;&gt;")), $items[0]['images']);
33+
$this->assertEquals([["url" => "test.png"], ["url" => "&lt;&amp;&gt;"]], $items[0]['images']);
3434
$this->assertEquals('TestTitle', $items[0]['title']);
35-
3635
}
3736

3837
public function testSitemapAttributes()
@@ -64,5 +63,4 @@ public function testSitemapCache()
6463
{
6564
//
6665
}
67-
68-
}
66+
}

0 commit comments

Comments
 (0)