Skip to content

Commit

Permalink
Short array syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
huwcbjones committed Aug 31, 2017
1 parent e701e31 commit 09c10a9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/TestCase/View/HelperTest.php
Expand Up @@ -195,15 +195,15 @@ public function testDebugInfo()
public function testAddClassArray()
{
$Helper = new TestHelper($this->View);
$input = array('class' => [
$input = ['class' => [
'element1',
'element2',
]);
$expected = array('class' => [
]];
$expected = ['class' => [
'element1',
'element2',
'element3'
]);
]];

$this->assertEquals(
$Helper->addClass($input, 'element3'),
Expand All @@ -218,8 +218,8 @@ public function testAddClassString()
{
$Helper = new TestHelper($this->View);

$input = array('class' => 'element1 element2');
$expected = array('class' => 'element1 element2 element3');
$input = ['class' => 'element1 element2'];
$expected = ['class' => 'element1 element2 element3'];

$this->assertEquals(
$Helper->addClass($input, 'element3'),
Expand All @@ -234,8 +234,8 @@ public function testAddClassEmpty()
{
$Helper = new TestHelper($this->View);

$input = array();
$expected = array('class' => 'element3');
$input = [];
$expected = ['class' => 'element3'];

$this->assertEquals(
$Helper->addClass($input, 'element3'),
Expand All @@ -251,8 +251,8 @@ public function testAddClassNull()
{
$Helper = new TestHelper($this->View);

$input = array();
$expected = array('class' => '');
$input = [];
$expected = ['class' => ''];

$this->assertEquals(
$Helper->addClass($input, null),
Expand Down

0 comments on commit 09c10a9

Please sign in to comment.