public function WorkbenchAccessTestTrait::isDrupal8 in Workbench Access 8
Checks if we are using Drupal 8 or 9.
Return value
bool TRUE if Drupal 8, FALSE otherwise.
1 call to WorkbenchAccessTestTrait::isDrupal8()
- UpdatePathTest::setUp in tests/
src/ Functional/ UpdatePathTest.php - Overrides WebTestBase::setUp() for update testing.
File
- tests/
src/ Traits/ WorkbenchAccessTestTrait.php, line 289
Class
- WorkbenchAccessTestTrait
- Contains helper classes for tests to set up various configuration.
Namespace
Drupal\Tests\workbench_access\TraitsCode
public function isDrupal8() {
$version = (int) substr(\Drupal::VERSION, 0, 1);
if ($version < 9) {
return TRUE;
}
return FALSE;
}