function InstalledPackageTest::testMetapackageWithAPath

@covers ::createFromArray

File

core/modules/package_manager/tests/src/Unit/InstalledPackageTest.php, line 55

Class

InstalledPackageTest
@coversDefaultClass \Drupal\package_manager\InstalledPackage

Namespace

Drupal\Tests\package_manager\Unit

Code

public function testMetapackageWithAPath() : void {
    $this->expectException(\AssertionError::class);
    $this->expectExceptionMessage('Metapackage install path must be NULL.');
    InstalledPackage::createFromArray([
        'name' => 'vendor/test',
        'type' => 'metapackage',
        'version' => '1.0.0',
        'path' => __DIR__,
    ]);
}

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