Skip to content

Commit ef8ae18

Browse files
Merge pull request #200 from bugsnag/tests
Added more error type tests
2 parents 2e570f9 + 532cc8a commit ef8ae18

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

tests/Bugsnag/ErrorTypesTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,22 @@ public function testGetLevelsForSeverity()
88
$this->assertSame(Bugsnag_ErrorTypes::getLevelsForSeverity('warning'), 674);
99
$this->assertSame(Bugsnag_ErrorTypes::getLevelsForSeverity('info'), 27656);
1010
}
11+
12+
public function testIsFatal()
13+
{
14+
$this->assertFalse(Bugsnag_ErrorTypes::isFatal(E_CORE_WARNING));
15+
$this->assertTrue(Bugsnag_ErrorTypes::isFatal(E_COMPILE_ERROR));
16+
}
17+
18+
public function testGetName()
19+
{
20+
$this->assertSame('PHP Notice', Bugsnag_ErrorTypes::getName(E_NOTICE));
21+
$this->assertSame('Unknown', Bugsnag_ErrorTypes::getName(42));
22+
}
23+
24+
public function testGetSeverity()
25+
{
26+
$this->assertSame('info', Bugsnag_ErrorTypes::getSeverity(E_NOTICE));
27+
$this->assertSame('error', Bugsnag_ErrorTypes::getSeverity(42));
28+
}
1129
}

0 commit comments

Comments
 (0)