8000 fixed unit tests after the last commit · lcf/symfony@5019010 · GitHub
[go: up one dir, main page]

Skip 8000 to content

Commit 5019010

Browse files
committed
fixed unit tests after the last commit
1 parent bf1eb56 commit 5019010

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

tests/Symfony/Tests/Component/EventDispatcher/EventTest.php

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ public function testParameters()
3737
$event->setParameter('foo', 'foo');
3838
$this->assertEquals('foo', $event->getParameter('foo'), '->setParameter() changes the value of a parameter');
3939
$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');
4241

4342
try {
4443
$event->getParameter('foobar');
@@ -66,27 +65,6 @@ public function testSetIsProcessed()
6665
$this->assertFalse($event->isProcessed(), '->setProcessed() changes the processed status');
6766
}
6867

69-
public function testArrayAccessInterface()
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');
88-
}
89-
9068
protected function createEvent()
9169
{
9270
$this->subject = new \stdClass();

0 commit comments

Comments
 (0)
0