$val) { $covered[$key] = 0; } $tests = $this->providerCodePage(); foreach ($tests as $test) { $covered[$test[1]] = 1; } foreach ($covered as $key => $val) { self::assertEquals(1, $val, "Codepage $key not tested"); } } public function testNumberToNameWithInvalidCodePage(): void { $invalidCodePage = 12345; try { CodePage::numberToName($invalidCodePage); } catch (Exception $e) { self::assertEquals($e->getMessage(), 'Unknown codepage: 12345'); return; } self::fail('An expected exception has not been raised.'); } public function testNumberToNameWithUnsupportedCodePage(): void { $unsupportedCodePage = 720; try { CodePage::numberToName($unsupportedCodePage); } catch (Exception $e) { self::assertEquals($e->getMessage(), 'Code page 720 not supported.'); return; } self::fail('An expected exception has not been raised.'); } }