public function testHandle() { $e = new ErrorHandler(0); $this->assertFalse($e->handle(0, 'foo', 'foo.php', 12, 'foo')); $e = new ErrorHandler(3); $this->assertFalse($e->handle(4, 'foo', 'foo.php', 12, 'foo')); $e = new ErrorHandler(3); try { $e->handle(1, 'foo', 'foo.php', 12, 'foo'); } catch (\ErrorException $e) { $this->assertSame('1: foo in foo.php line 12', $e->getMessage()); } }