|
11 | 11 |
|
12 | 12 | namespace CodeIgniter\Debug;
|
13 | 13 |
|
| 14 | +use CodeIgniter\Database\Exceptions\DatabaseException; |
| 15 | +use CodeIgniter\Entity\Exceptions\CastException; |
| 16 | +use CodeIgniter\Exceptions\ConfigException; |
14 | 17 | use CodeIgniter\Exceptions\PageNotFoundException;
|
15 | 18 | use CodeIgniter\Test\CIUnitTestCase;
|
16 | 19 | use CodeIgniter\Test\ReflectionHelper;
|
@@ -60,6 +63,13 @@ public function testDetermineCodes(): void
|
60 | 63 | $this->assertSame([500, EXIT__AUTO_MIN], $determineCodes(new RuntimeException('This.')));
|
61 | 64 | $this->assertSame([500, EXIT_ERROR], $determineCodes(new RuntimeException('That.', 600)));
|
62 | 65 | $this->assertSame([404, EXIT_ERROR], $determineCodes(new RuntimeException('There.', 404)));
|
| 66 | + $this->assertSame([167, EXIT_ERROR], $determineCodes(new RuntimeException('This.', 167))); |
| 67 | + // @TODO This exit code should be EXIT_CONFIG. |
| 68 | + $this->assertSame([500, 12], $determineCodes(new ConfigException('This.'))); |
| 69 | + // @TODO This exit code should be EXIT_CONFIG. |
| 70 | + $this->assertSame([500, 9], $determineCodes(new CastException('This.'))); |
| 71 | + // @TODO This exit code should be EXIT_DATABASE. |
| 72 | + $this->assertSame([500, 17], $determineCodes(new DatabaseException('This.'))); |
63 | 73 | }
|
64 | 74 |
|
65 | 75 | public function testRenderBacktrace(): void
|
|
0 commit comments