You are here

public function ToolkitSetupTrait::providerToolkitConfiguration in ImageMagick 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/ToolkitSetupTrait.php \Drupal\Tests\imagemagick\Kernel\ToolkitSetupTrait::providerToolkitConfiguration()

Provides toolkit configuration data for tests.

Return value

array[] An associative array, with key the toolkit scenario to be tested, and value an associative array with the following keys:

  • 'toolkit_id': the toolkit to be used in the test.
  • 'toolkit_config': the config object of the toolkit.
  • 'toolkit_settings': an associative array of toolkit settings.

File

tests/src/Kernel/ToolkitSetupTrait.php, line 88

Class

ToolkitSetupTrait
Trait to manage toolkit setup tasks common across tests.

Namespace

Drupal\Tests\imagemagick\Kernel

Code

public function providerToolkitConfiguration() {
  return [
    'ImageMagick-imagemagick' => [
      'toolkit_id' => 'imagemagick',
      'toolkit_config' => 'imagemagick.settings',
      'toolkit_settings' => [
        'binaries' => 'imagemagick',
        'quality' => 100,
        'debug' => TRUE,
        // Add a fallback locale for DrupalCI testbots that do not have
        // en_US.UTF-8 installed.
        'locale' => 'en_US.UTF-8 C.UTF-8',
      ],
    ],
    'ImageMagick-graphicsmagick' => [
      'toolkit_id' => 'imagemagick',
      'toolkit_config' => 'imagemagick.settings',
      'toolkit_settings' => [
        'binaries' => 'graphicsmagick',
        'quality' => 100,
        'debug' => TRUE,
        // Add a fallback locale for DrupalCI testbots that do not have
        // en_US.UTF-8 installed.
        'locale' => 'en_US.UTF-8 C.UTF-8',
      ],
    ],
  ];
}