public function testBefore() { $app = new Application(); $handler1 = $this->getMock('Durian\\Handler'); $handler2 = $this->getMock('Durian\\Handler'); $app->handlers([$handler1]); $app->before($handler2); $this->assertSame([$handler2, $handler1], $app->handlers()); }