You are here

protected function ApcuBackendUnitTest::requirementsFail in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php \Drupal\system\Tests\Cache\ApcuBackendUnitTest::requirementsFail()

Check if requirements fail.

If the requirements fail the test method should return immediately instead of running any tests. Messages will be output to display why the test was skipped.

11 calls to ApcuBackendUnitTest::requirementsFail()
ApcuBackendUnitTest::testDelete in core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php
Tests Drupal\Core\Cache\CacheBackendInterface::delete().
ApcuBackendUnitTest::testDeleteAll in core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php
Test Drupal\Core\Cache\CacheBackendInterface::deleteAll().
ApcuBackendUnitTest::testDeleteMultiple in core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php
Test Drupal\Core\Cache\CacheBackendInterface::delete() and Drupal\Core\Cache\CacheBackendInterface::deleteMultiple().
ApcuBackendUnitTest::testGetMultiple in core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php
Tests Drupal\Core\Cache\CacheBackendInterface::getMultiple().
ApcuBackendUnitTest::testInvalidate in core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php
Test Drupal\Core\Cache\CacheBackendInterface::invalidate() and Drupal\Core\Cache\CacheBackendInterface::invalidateMultiple().

... See full list

File

core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php, line 53
Contains \Drupal\system\Tests\Cache\ApcuBackendUnitTest.

Class

ApcuBackendUnitTest
Tests the APCu cache backend.

Namespace

Drupal\system\Tests\Cache

Code

protected function requirementsFail() {
  $requirements = $this
    ->getRequirements();
  if (!empty($requirements)) {
    foreach ($requirements as $message) {
      $this
        ->pass($message);
    }
    return TRUE;
  }
  return FALSE;
}