You are here

public function CodePageTest::testNumberToNameWithInvalidCodePage in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Shared/CodePageTest.php \CodePageTest::testNumberToNameWithInvalidCodePage()

File

vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Shared/CodePageTest.php, line 33

Class

CodePageTest

Code

public function testNumberToNameWithInvalidCodePage() {
  $invalidCodePage = 12345;
  try {
    $result = call_user_func(array(
      'PHPExcel_Shared_CodePage',
      'NumberToName',
    ), $invalidCodePage);
  } catch (Exception $e) {
    $this
      ->assertEquals($e
      ->getMessage(), 'Unknown codepage: 12345');
    return;
  }
  $this
    ->fail('An expected exception has not been raised.');
}