trait DrupalVersion in Acquia Content Hub 8.2
Drupal version trait for consistency.
@package Drupal\Tests\acquia_contenthub\Kernel\Stubs
Hierarchy
- trait \Drupal\Tests\acquia_contenthub\Kernel\Stubs\DrupalVersion
7 files declare their use of DrupalVersion
- AnonymousUserTest.php in tests/
src/ Kernel/ EventSubscriber/ EntityDataTamper/ AnonymousUserTest.php - ExportTest.php in tests/
src/ Kernel/ ExportTest.php - ImportExportTestBase.php in tests/
src/ Kernel/ ImportExportTestBase.php - LinkFieldSerializerTest.php in tests/
src/ Kernel/ EventSubscriber/ SerializeContentField/ LinkFieldSerializerTest.php - PathFieldSerializerTest.php in tests/
src/ Kernel/ EventSubscriber/ SerializeContentField/ PathFieldSerializerTest.php
File
- tests/
src/ Kernel/ Stubs/ DrupalVersion.php, line 10
Namespace
Drupal\Tests\acquia_contenthub\Kernel\StubsView source
trait DrupalVersion {
/**
* Get the current version of Drupal to identify fixtures for tests.
*
* @return string
* The Drupal version string.
*/
protected function getDrupalVersion() {
$version = implode('.', explode('.', \Drupal::VERSION, -1));
return "drupal-{$version}";
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DrupalVersion:: |
protected | function | Get the current version of Drupal to identify fixtures for tests. |