Example #1
0
 /**
  * Constructor.
  *
  * @param   string  $name       The event name.
  * @param   array   $arguments  The event arguments.
  *
  * @throws  BadMethodCallException
  *
  * @since   1.0
  */
 public function __construct($name, array $arguments = array())
 {
     if ($this->constructed) {
         throw new BadMethodCallException(sprintf('Cannot reconstruct the EventImmutable %s.', $this->name));
     }
     $this->constructed = true;
     parent::__construct($name, $arguments);
 }
 /**
  * Test the isStopped method.
  * An immutable event shoudln't be stopped, otherwise it won't trigger.
  *
  * @return  void
  *
  * @since   1.0
  */
 public function testIsStopped()
 {
     $this->assertFalse($this->instance->isStopped());
 }