Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\EventDispatcher\Tests; Chris@0: Chris@0: use PHPUnit\Framework\TestCase; Chris@0: use Symfony\Component\EventDispatcher\Event; Chris@0: Chris@0: /** Chris@0: * Test class for Event. Chris@0: */ Chris@0: class EventTest extends TestCase Chris@0: { Chris@0: /** Chris@0: * @var \Symfony\Component\EventDispatcher\Event Chris@0: */ Chris@0: protected $event; Chris@0: Chris@0: /** Chris@0: * Sets up the fixture, for example, opens a network connection. Chris@0: * This method is called before a test is executed. Chris@0: */ Chris@0: protected function setUp() Chris@0: { Chris@0: $this->event = new Event(); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Tears down the fixture, for example, closes a network connection. Chris@0: * This method is called after a test is executed. Chris@0: */ Chris@0: protected function tearDown() Chris@0: { Chris@0: $this->event = null; Chris@0: } Chris@0: Chris@0: public function testIsPropagationStopped() Chris@0: { Chris@0: $this->assertFalse($this->event->isPropagationStopped()); Chris@0: } Chris@0: Chris@0: public function testStopPropagationAndIsPropagationStopped() Chris@0: { Chris@0: $this->event->stopPropagation(); Chris@0: $this->assertTrue($this->event->isPropagationStopped()); Chris@0: } Chris@0: }