1 node_access_example.test protected NodeAccessExampleTestCase::checkResponse($grant, $url)

Helper function.

Test if there is access to an $url

Parameters

bool $grant: Access to the $url

string $url: url to make the get call.

Return value

bool: Get response

File

modules/examples/node_access_example/tests/node_access_example.test, line 315
Tests for Node Access example module.

Class

NodeAccessExampleTestCase
Functional tests for the Node Access Example module.

Code

protected function checkResponse($grant, $url) {
  $this->backdropGet($url);
  if ($grant) {
    $response = $this->assertResponse(200);
  }
  else {
    $response = $this->assertResponse(403);
  }
  return $response;
}