PopTest\Event\EventTest::testStop PHP Method

testStop() public method

public testStop ( )
    public function testStop()
    {
        $e = new Manager();
        $e->attach('pre', function ($name) {
            return Manager::STOP;
        }, 2);
        $e->attach('pre', function ($result) {
            return 'Hello, ' . $result;
        }, 1);
        $e->trigger('pre', array('name' => 'World'));
        $results = $e->getResults('pre');
        $this->assertEquals(1, count($results));
        $this->assertEquals(Manager::STOP, $results[0]);
    }