You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/Symfony/Tests/Component/EventDispatcher/EventTest.php
+1-23Lines changed: 1 addition & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,7 @@ public function testParameters()
37
37
$event->setParameter('foo', 'foo');
38
38
$this->assertEquals('foo', $event->getParameter('foo'), '->setParameter() changes the value of a parameter');
39
39
$this->assertTrue($event->hasParameter('foo'), '->hasParameter() returns true if the parameter is defined');
40
-
unset($event['foo']);
41
-
$this->assertFalse($event->hasParameter('foo'), '->hasParameter() returns false if the parameter is not defined');
40
+
$this->assertFalse($event->hasParameter('oof'), '->hasParameter() returns false if the parameter is not defined');
42
41
43
42
try {
44
43
$event->getParameter('foobar');
@@ -66,27 +65,6 @@ public function testSetIsProcessed()
66
65
$this->assertFalse($event->isProcessed(), '->setProcessed() changes the processed status');
67
66
}
68
67
69
-
publicfunctiontestArrayAccessInterface()
70
-
{
71
-
$event = $this->createEvent();
72
-
73
-
$this->assertEquals('bar', $event['foo'], 'Event implements the ArrayAccess interface');
74
-
$event['foo'] = 'foo';
75
-
$this->assertEquals('foo', $event['foo'], 'Event implements the ArrayAccess interface');
76
-
77
-
try {
78
-
$event['foobar'];
79
-
$this->fail('::offsetGet() throws an \InvalidArgumentException exception when the parameter does not exist');
80
-
} catch (\Exception$e) {
81
-
$this->assertInstanceOf('\InvalidArgumentException', $e, '::offsetGet() throws an \InvalidArgumentException exception when the parameter does not exist');
82
-
$this->assertEquals('The event "name" has no "foobar" parameter.', $e->getMessage(), '::offsetGet() throws an \InvalidArgumentException exception when the parameter does not exist');
83
-
}
84
-
85
-
$this->assertTrue(isset($event['foo']), 'Event implements the ArrayAccess interface');
86
-
unset($event['foo']);
87
-
$this->assertFalse(isset($event['foo']), 'Event implements the ArrayAccess interface');
0 commit comments