fix merge
This commit is contained in:
parent
3e54cb71de
commit
1d57b800aa
@ -397,33 +397,6 @@ class EventDispatcherTest extends TestCase
|
|||||||
|
|
||||||
$this->assertTrue($testLoaded);
|
$this->assertTrue($testLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @group legacy
|
|
||||||
* @expectedDeprecation Calling the "Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.
|
|
||||||
*/
|
|
||||||
public function testLegacySignatureWithoutEvent()
|
|
||||||
{
|
|
||||||
$this->dispatcher->dispatch('foo');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @group legacy
|
|
||||||
* @expectedDeprecation Calling the "Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.
|
|
||||||
*/
|
|
||||||
public function testLegacySignatureWithEvent()
|
|
||||||
{
|
|
||||||
$this->dispatcher->dispatch('foo', new Event());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException \TypeError
|
|
||||||
* @expectedExceptionMessage Argument 1 passed to "Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()" must be an object, string given.
|
|
||||||
*/
|
|
||||||
public function testLegacySignatureWithNewEventObject()
|
|
||||||
{
|
|
||||||
$this->dispatcher->dispatch('foo', new ContractsEvent());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class CallableClass
|
class CallableClass
|
||||||
|
Reference in New Issue
Block a user