protected function createHandler($options = array(), $notifyOnWarning = true) { Airbrake\EventHandler::reset(); $this->connection = new TestConnection(); $this->handler = Airbrake\EventHandler::start(1, $notifyOnWarning, $options); $this->handler->getClient()->setConnection($this->connection); }
/** * @dataProvider testMethodsProvider */ public function testMethods($expected_level, $method_name) { Airbrake\EventHandler::reset(); $connection = new TestConnection(); $options = array('errorReportingLevel' => $expected_level); $handler = Airbrake\EventHandler::start(1, true, $options); $handler->getClient()->setConnection($connection); $this->h->{$method_name}(); $this->assertEquals(1, $connection->send_calls); }