function MultisiteValidatorTest::providerMultisite
Data provider for testMultisite().
Return value
mixed[][] The test cases.
File
-
core/
modules/ package_manager/ tests/ src/ Kernel/ MultisiteValidatorTest.php, line 25
Class
- MultisiteValidatorTest
- @covers \Drupal\package_manager\Validator\MultisiteValidator @group package_manager @internal
Namespace
Drupal\Tests\package_manager\KernelCode
public static function providerMultisite() : array {
return [
'sites.php present and listing multiple sites' => [
<<<'PHP'
<?php
// Site 1: the main site.
$sites['example.com'] = 'default';
// Site 2: the shop.
$sites['shop.example.com'] = 'shop';
PHP
,
[
ValidationResult::createError([
t('Drupal multisite is not supported by Package Manager.'),
]),
],
],
'sites.php present and listing single site' => [
<<<'PHP'
<?php
// Site 1: the main site.
$sites['example.com'] = 'default';
PHP
,
[],
],
'sites.php present and listing multiple aliases for a single site' => [
<<<'PHP'
<?php
// Site 1: the main site.
$sites['example.com'] = 'example';
// Alias for site 1!
$sites['example.dev'] = 'example';
PHP
,
[],
],
'sites.php absent' => [
NULL,
[],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.