function ConfigTest::testSkipClean

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/ConfigTest.php \Drupal\Tests\Composer\Plugin\VendorHardening\ConfigTest::testSkipClean()

Tests skip clean.

@legacy-covers ::getAllCleanupPaths

File

core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/ConfigTest.php, line 127

Class

ConfigTest
Tests Drupal\Composer\Plugin\VendorHardening\Config.

Namespace

Drupal\Tests\Composer\Plugin\VendorHardening

Code

public function testSkipClean() : void {
  $root = $this->createMock(RootPackageInterface::class);
  $root->expects($this->once())
    ->method('getExtra')
    ->willReturn([
    'drupal-core-vendor-hardening' => [
      'composer/composer' => FALSE,
    ],
  ]);
  $plugin_config = (new Config($root))->getAllCleanupPaths();
  $this->assertArrayNotHasKey('composer/composer', $plugin_config);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.