function LockFileValidatorTest::testCreateWithLock

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

@covers ::storeHash @covers ::deleteHash

File

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

Class

LockFileValidatorTest
@coversDefaultClass \Drupal\package_manager\Validator\LockFileValidator @group package_manager @internal

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.