You are here

public function ChecklistapiModuleTest::testChecklistapiChecklistAccessInvalidMode in Checklist API 8

Tests that checklistapi_checklist_access() rejects an invalid mode.

File

tests/src/Unit/ChecklistapiModuleTest.php, line 103

Class

ChecklistapiModuleTest
Tests the functions in checklistapi.module.

Namespace

Drupal\Tests\checklistapi\Unit

Code

public function testChecklistapiChecklistAccessInvalidMode() {
  $this
    ->expectException(\InvalidArgumentException::class);
  $this
    ->expectExceptionMessage('No such operation "invalid operation');
  checklistapi_checklist_access(NULL, 'invalid operation');
}