You are here

public function AdvDefTest::testDefaultConfig in Image Optimize Binaries 8

Test that the default config of the plugin is set.

File

tests/src/Unit/AdvDefTest.php, line 17

Class

AdvDefTest
Tests AdvDef image optimize plugin.

Namespace

Drupal\Tests\imageapi_optimize_binaries\Unit

Code

public function testDefaultConfig() {
  $config = [];
  $loggerMock = $this
    ->getLoggerMock();
  $imageFactoryMock = $this
    ->getImageFactoryMock();
  $fileSystemMock = $this
    ->getFileSystemMock();
  $shellOperationsMock = $this
    ->getShellOperationsMock();
  $advdef = new AdvDef($config, 'advdef', [], $loggerMock, $imageFactoryMock, $fileSystemMock, $shellOperationsMock);
  $this
    ->assertArrayHasKey('recompress', $advdef
    ->defaultConfiguration());
  $this
    ->assertArrayHasKey('mode', $advdef
    ->defaultConfiguration());
}