trait BlazyKernelTestTrait in Blazy 8.2
Same name and namespace in other branches
- 8 tests/src/Traits/BlazyKernelTestTrait.php \Drupal\Tests\blazy\Traits\BlazyKernelTestTrait
A trait common for Kernel tests.
Hierarchy
- trait \Drupal\Tests\blazy\Traits\BlazyKernelTestTrait uses BlazyCreationTestTrait, BlazyUnitTestTrait
2 files declare their use of BlazyKernelTestTrait
- BlazyKernelTestBase.php in tests/
src/ Kernel/ BlazyKernelTestBase.php - BlazyViewsTestBase.php in tests/
src/ Kernel/ Views/ BlazyViewsTestBase.php
File
- tests/
src/ Traits/ BlazyKernelTestTrait.php, line 8
Namespace
Drupal\Tests\blazy\TraitsView source
trait BlazyKernelTestTrait {
use BlazyUnitTestTrait;
use BlazyCreationTestTrait;
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Setup common Kernel classes.
*/
protected function setUpKernelInstall() {
$this
->installConfig([
'field',
'image',
'responsive_image',
'node',
'views',
'blazy',
]);
$this
->installSchema('user', [
'users_data',
]);
$this
->installSchema('node', [
'node_access',
]);
$this
->installSchema('file', [
'file_usage',
]);
$this
->installEntitySchema('user');
$this
->installEntitySchema('node');
$this
->installEntitySchema('file');
$this
->installEntitySchema('media');
// @todo $this->installEntitySchema('entity_test');
}
/**
* Setup common Kernel manager classes.
*/
protected function setUpKernelManager() {
$this->root = $this->container
->get('app.root');
$this->fileSystem = $this->container
->get('file_system');
$this->entityFieldManager = $this->container
->get('entity_field.manager');
$this->fieldTypePluginManager = $this->container
->get('plugin.manager.field.field_type');
$this->formatterPluginManager = $this->container
->get('plugin.manager.field.formatter');
$this->blazyManager = $this->container
->get('blazy.manager');
$this->blazyOembed = $this->container
->get('blazy.oembed');
$this->blazyEntity = $this->container
->get('blazy.entity');
$this->BlazyFormatter = $this->container
->get('blazy.formatter');
$this->blazyAdminFormatter = $this->container
->get('blazy.admin.formatter');
$this->blazyAdmin = $this->container
->get('blazy.admin');
$this->blazyAdminExtended = $this->container
->get('blazy.admin.extended');
// Enable Responsive image support.
$this->blazyManager
->getConfigFactory()
->getEditable('blazy.settings')
->set('responsive_image', TRUE)
->save();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlazyCreationTestTrait:: |
protected | property | Testing node type. | |
BlazyCreationTestTrait:: |
protected | function | Sets field values as built by FieldItemListInterface::view(). | |
BlazyCreationTestTrait:: |
protected | function | Sets field values as built by FieldItemListInterface::view(). | |
BlazyCreationTestTrait:: |
protected | function | Returns the created image file. | |
BlazyCreationTestTrait:: |
protected | function | Create referencing entity. | |
BlazyCreationTestTrait:: |
protected | function | Gets the field definition. | |
BlazyCreationTestTrait:: |
protected | function | Gets the field storage configuration. | |
BlazyCreationTestTrait:: |
protected | function | Returns the field formatter instance. | |
BlazyCreationTestTrait:: |
protected | function | Returns path to the stored image location. | |
BlazyCreationTestTrait:: |
protected | function | Prepares test directory to store screenshots, or images. | |
BlazyCreationTestTrait:: |
protected | function | Build dummy content types. | |
BlazyCreationTestTrait:: |
protected | function | Build dummy contents with entity references. | |
BlazyCreationTestTrait:: |
protected | function | Build dummy nodes with optional fields. | |
BlazyCreationTestTrait:: |
protected | function | Setup a new image field. | |
BlazyCreationTestTrait:: |
protected | function | Setup formatter displays, default to image, and update its settings. | |
BlazyCreationTestTrait:: |
protected | function | Set up dummy image. | |
BlazyKernelTestTrait:: |
protected | property | ||
BlazyKernelTestTrait:: |
protected | function | Setup common Kernel classes. | |
BlazyKernelTestTrait:: |
protected | function | Setup common Kernel manager classes. | |
BlazyPropertiesTestTrait:: |
protected | property | The blazy admin service. | |
BlazyPropertiesTestTrait:: |
protected | property | The blazy admin service. | |
BlazyPropertiesTestTrait:: |
protected | property | The blazy entity service. | |
BlazyPropertiesTestTrait:: |
protected | property | The blazy manager service. | |
BlazyPropertiesTestTrait:: |
protected | property | The bundle name. | |
BlazyPropertiesTestTrait:: |
protected | property | The entity display. | |
BlazyPropertiesTestTrait:: |
protected | property | The entity. | |
BlazyPropertiesTestTrait:: |
protected | property | The entity. | |
BlazyPropertiesTestTrait:: |
protected | property | The entity manager. | |
BlazyPropertiesTestTrait:: |
protected | property | The tested entity reference formatter ID. | |
BlazyPropertiesTestTrait:: |
protected | property | The tested entity type. | |
BlazyPropertiesTestTrait:: |
protected | property | The filter format. | |
BlazyPropertiesTestTrait:: |
protected | property | The filter format. | |
BlazyPropertiesTestTrait:: |
protected | property | The formatter definition. | |
BlazyPropertiesTestTrait:: |
protected | property | The formatter plugin manager. | |
BlazyPropertiesTestTrait:: |
protected | property | The created image item. | |
BlazyPropertiesTestTrait:: |
protected | property | The maximum number of created images. | |
BlazyPropertiesTestTrait:: |
protected | property | The maximum number of created paragraphs. | |
BlazyPropertiesTestTrait:: |
protected | property | The node entity. | |
BlazyPropertiesTestTrait:: |
protected | property | The referenced node entity. | |
BlazyPropertiesTestTrait:: |
protected | property | The node entity. | |
BlazyPropertiesTestTrait:: |
protected | property | The tested skins. | |
BlazyPropertiesTestTrait:: |
protected | property | The target bundle names. | |
BlazyPropertiesTestTrait:: |
protected | property | The tested empty field name. | |
BlazyPropertiesTestTrait:: |
protected | property | The tested empty field type. | |
BlazyPropertiesTestTrait:: |
protected | property | The tested field name. | |
BlazyPropertiesTestTrait:: |
protected | property | The tested field type. | |
BlazyPropertiesTestTrait:: |
protected | property | The created item. | |
BlazyPropertiesTestTrait:: |
protected | property | The created items. | |
BlazyPropertiesTestTrait:: |
protected | property | The tested formatter ID. | |
BlazyPropertiesTestTrait:: |
protected | property | The tested type definitions. | |
BlazyUnitTestTrait:: |
protected | property | The formatter settings. | |
BlazyUnitTestTrait:: |
protected | function | Pre render Blazy image. | |
BlazyUnitTestTrait:: |
protected | function | Return dummy cache metadata. | |
BlazyUnitTestTrait:: |
protected | function | Returns the default field formatter definition. | |
BlazyUnitTestTrait:: |
protected | function | Returns the default field definition. | |
BlazyUnitTestTrait:: |
protected | function | Returns dummy fields for an entity reference. | |
BlazyUnitTestTrait:: |
protected | function | Returns the default field formatter definition. | |
BlazyUnitTestTrait:: |
protected | function | Returns the field formatter definition along with settings. | |
BlazyUnitTestTrait:: |
protected | function | Returns sensible formatter settings for testing purposes. | |
BlazyUnitTestTrait:: |
protected | function | Sets the field formatter definition. | |
BlazyUnitTestTrait:: |
protected | function | Sets formatter setting. | |
BlazyUnitTestTrait:: |
protected | function | Sets formatter settings. | |
BlazyUnitTestTrait:: |
protected | function | Setup the unit images. | |
BlazyUnitTestTrait:: |
protected | function | Setup the unit images. | |
BlazyUnitTestTrait:: |
protected | function | Set up Blazy variables. |