function LockFileValidatorTest::testCreateWithLock

Tests that if an active lock file exists, a stage can be created.

@legacy-covers ::storeHash @legacy-covers ::deleteHash

File

core/modules/package_manager/tests/src/Kernel/LockFileValidatorTest.php, line 99

Class

LockFileValidatorTest
Tests Drupal\package_manager\Validator\LockFileValidator.

Namespace

Drupal\Tests\package_manager\Kernel

Code

public function testCreateWithLock() : void {
  $this->assertResults([]);
  // Change the lock file to ensure the stored hash of the previous version
  // has been deleted.
  file_put_contents($this->activeDir . '/composer.lock', '{"changed": true}');
  $this->assertResults([]);
}

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