/**
  * Test the remove method.
  *
  * @return  void
  *
  * @since   1.0
  */
 public function testRemove()
 {
     $listener1 = new EmptyListener();
     $listener2 = new EmptyListener();
     $listener3 = function () {
     };
     $listener4 = new EmptyListener();
     $this->instance->add($listener1, 0);
     $this->instance->add($listener2, 0);
     $this->instance->add($listener3, 0);
     // Removing a non existing listener has no effect.
     $this->instance->remove($listener4);
     $this->assertTrue($this->instance->has($listener1));
     $this->assertTrue($this->instance->has($listener2));
     $this->assertTrue($this->instance->has($listener3));
     $this->instance->remove($listener1);
     $this->assertFalse($this->instance->has($listener1));
     $this->assertTrue($this->instance->has($listener2));
     $this->assertTrue($this->instance->has($listener3));
     $this->instance->remove($listener2);
     $this->instance->remove($listener3);
     $this->assertFalse($this->instance->has($listener1));
     $this->assertFalse($this->instance->has($listener2));
     $this->assertFalse($this->instance->has($listener3));
 }
 /**
  * Test the remove method.
  *
  * @return  void
  *
  * @since   1.0
  */
 public function testRemove()
 {
     $listener1 = function () {
     };
     $listener2 = function () {
         return false;
     };
     $this->instance->add($listener1, 0);
     // Removing a non existing listener has no effect.
     $this->instance->remove($listener2);
     $this->assertTrue($this->instance->has($listener1));
     $this->instance->add($listener2, 0);
     $this->assertTrue($this->instance->has($listener1));
     $this->assertTrue($this->instance->has($listener2));
     $this->instance->remove($listener1);
     $this->assertFalse($this->instance->has($listener1));
     $this->assertTrue($this->instance->has($listener2));
     $this->instance->remove($listener2);
     $this->assertFalse($this->instance->has($listener1));
     $this->assertFalse($this->instance->has($listener2));
 }