updated packages
This commit is contained in:
@@ -32,7 +32,7 @@ class GenericEventTest extends TestCase
|
||||
protected function setUp()
|
||||
{
|
||||
$this->subject = new \stdClass();
|
||||
$this->event = new GenericEvent($this->subject, array('name' => 'Event'));
|
||||
$this->event = new GenericEvent($this->subject, ['name' => 'Event']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,7 +46,7 @@ class GenericEventTest extends TestCase
|
||||
|
||||
public function testConstruct()
|
||||
{
|
||||
$this->assertEquals($this->event, new GenericEvent($this->subject, array('name' => 'Event')));
|
||||
$this->assertEquals($this->event, new GenericEvent($this->subject, ['name' => 'Event']));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,20 +55,20 @@ class GenericEventTest extends TestCase
|
||||
public function testGetArguments()
|
||||
{
|
||||
// test getting all
|
||||
$this->assertSame(array('name' => 'Event'), $this->event->getArguments());
|
||||
$this->assertSame(['name' => 'Event'], $this->event->getArguments());
|
||||
}
|
||||
|
||||
public function testSetArguments()
|
||||
{
|
||||
$result = $this->event->setArguments(array('foo' => 'bar'));
|
||||
$this->assertAttributeSame(array('foo' => 'bar'), 'arguments', $this->event);
|
||||
$result = $this->event->setArguments(['foo' => 'bar']);
|
||||
$this->assertAttributeSame(['foo' => 'bar'], 'arguments', $this->event);
|
||||
$this->assertSame($this->event, $result);
|
||||
}
|
||||
|
||||
public function testSetArgument()
|
||||
{
|
||||
$result = $this->event->setArgument('foo2', 'bar2');
|
||||
$this->assertAttributeSame(array('name' => 'Event', 'foo2' => 'bar2'), 'arguments', $this->event);
|
||||
$this->assertAttributeSame(['name' => 'Event', 'foo2' => 'bar2'], 'arguments', $this->event);
|
||||
$this->assertEquals($this->event, $result);
|
||||
}
|
||||
|
||||
@@ -99,13 +99,13 @@ class GenericEventTest extends TestCase
|
||||
public function testOffsetSet()
|
||||
{
|
||||
$this->event['foo2'] = 'bar2';
|
||||
$this->assertAttributeSame(array('name' => 'Event', 'foo2' => 'bar2'), 'arguments', $this->event);
|
||||
$this->assertAttributeSame(['name' => 'Event', 'foo2' => 'bar2'], 'arguments', $this->event);
|
||||
}
|
||||
|
||||
public function testOffsetUnset()
|
||||
{
|
||||
unset($this->event['name']);
|
||||
$this->assertAttributeSame(array(), 'arguments', $this->event);
|
||||
$this->assertAttributeSame([], 'arguments', $this->event);
|
||||
}
|
||||
|
||||
public function testOffsetIsset()
|
||||
@@ -127,10 +127,10 @@ class GenericEventTest extends TestCase
|
||||
|
||||
public function testHasIterator()
|
||||
{
|
||||
$data = array();
|
||||
$data = [];
|
||||
foreach ($this->event as $key => $value) {
|
||||
$data[$key] = $value;
|
||||
}
|
||||
$this->assertEquals(array('name' => 'Event'), $data);
|
||||
$this->assertEquals(['name' => 'Event'], $data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user