Permalink
Browse files

[EventDispatcher] Added missing object destruction in test tearDown()…

… and removed duplicated tests.
  • Loading branch information...
Drak
Drak committed Dec 5, 2011
1 parent 6924e63 commit 541888d0a501d4f80d6e511d96dae3a075338b7e
Showing with 3 additions and 8 deletions.
  1. +3 −8 tests/Symfony/Tests/Component/EventDispatcher/EventTest.php
@@ -23,7 +23,7 @@ class EventTest extends \PHPUnit_Framework_TestCase
* @var \Symfony\Component\EventDispatcher\Event
*/
protected $event;
/**
* @var \Symfony\Component\EventDispatcher\EventDispatcher
*/
@@ -47,18 +47,16 @@ protected function setUp()
protected function tearDown()
{
$this->event = null;
$this->eventDispatcher = null;
}
public function testIsPropagationStopped()
{
$this->assertFalse($this->event->isPropagationStopped());
$this->event->stopPropagation();
$this->assertTrue($this->event->isPropagationStopped());
}
public function testStopPropagation()
public function testStopPropagationAndIsPropagationStopped()
{
$this->assertFalse($this->event->isPropagationStopped());
$this->event->stopPropagation();
$this->assertTrue($this->event->isPropagationStopped());
}
@@ -72,8 +70,6 @@ public function testSetDispatcher()
public function testGetDispatcher()
{
$this->assertNull($this->event->getDispatcher());
$this->event->setDispatcher($this->dispatcher);
$this->assertSame($this->dispatcher, $this->event->getDispatcher());
}
public function testGetName()
@@ -83,7 +79,6 @@ public function testGetName()
public function testSetName()
{
$this->assertNull($this->event->getName());
$this->event->setName('foo');
$this->assertEquals('foo', $this->event->getName());
}

0 comments on commit 541888d

Please sign in to comment.