Update to Drupal 8.0.5. For more information, see https://www.drupal.org/node/2679347

This commit is contained in:
Pantheon Automation 2016-03-02 12:40:24 -08:00 committed by Greg Anderson
parent 2a9f1f148d
commit fd3b12cf27
251 changed files with 5439 additions and 957 deletions

View file

@ -7,6 +7,7 @@
namespace Drupal\Tests\simpletest\Unit;
use Drupal\simpletest\TestDiscovery;
use Drupal\Tests\UnitTestCase;
/**
@ -30,8 +31,9 @@ class TestInfoParsingTest extends UnitTestCase {
// Expected result.
[
'name' => 'Drupal\Tests\simpletest\Unit\TestInfoParsingTest',
'group' => 'PHPUnit',
'group' => 'simpletest',
'description' => 'Tests \Drupal\simpletest\TestDiscovery.',
'type' => 'PHPUnit-Unit',
],
// Classname.
'Drupal\Tests\simpletest\Unit\TestInfoParsingTest',
@ -42,8 +44,9 @@ class TestInfoParsingTest extends UnitTestCase {
// Expected result.
[
'name' => 'Drupal\Tests\Core\DrupalTest',
'group' => 'PHPUnit',
'group' => 'DrupalTest',
'description' => 'Tests \Drupal.',
'type' => 'PHPUnit-Unit',
],
// Classname.
'Drupal\Tests\Core\DrupalTest',
@ -56,11 +59,25 @@ class TestInfoParsingTest extends UnitTestCase {
'name' => 'Drupal\Tests\simpletest\Functional\BrowserTestBaseTest',
'group' => 'simpletest',
'description' => 'Tests BrowserTestBase functionality.',
'type' => 'PHPUnit-Functional',
],
// Classname.
'Drupal\Tests\simpletest\Functional\BrowserTestBaseTest',
];
// kernel PHPUnit test.
$tests['phpunit-kernel'] = [
// Expected result.
[
'name' => '\Drupal\Tests\file\Kernel\FileItemValidationTest',
'group' => 'file',
'description' => 'Tests that files referenced in file and image fields are always validated.',
'type' => 'PHPUnit-Kernel',
],
// Classname.
'\Drupal\Tests\file\Kernel\FileItemValidationTest',
];
// Simpletest classes can not be autoloaded in a PHPUnit test, therefore
// provide a docblock.
$tests[] = [
@ -69,6 +86,7 @@ class TestInfoParsingTest extends UnitTestCase {
'name' => 'Drupal\field\Tests\BulkDeleteTest',
'group' => 'field',
'description' => 'Bulk delete storages and fields, and clean up afterwards.',
'type' => 'Simpletest',
],
// Classname.
'Drupal\field\Tests\BulkDeleteTest',
@ -88,6 +106,7 @@ class TestInfoParsingTest extends UnitTestCase {
'name' => 'Drupal\field\Tests\BulkDeleteTest',
'group' => 'field',
'description' => 'Bulk delete storages and fields, and clean up afterwards.',
'type' => 'Simpletest'
],
// Classname.
'Drupal\field\Tests\BulkDeleteTest',
@ -108,6 +127,7 @@ class TestInfoParsingTest extends UnitTestCase {
'name' => 'Drupal\field\Tests\BulkDeleteTest',
'group' => 'field',
'description' => 'Bulk delete storages and fields, and clean up afterwards. * @',
'type' => 'Simpletest'
],
// Classname.
'Drupal\field\Tests\BulkDeleteTest',
@ -127,6 +147,7 @@ class TestInfoParsingTest extends UnitTestCase {
'name' => 'Drupal\field\Tests\BulkDeleteTest',
'group' => 'Test',
'description' => 'Bulk delete storages and fields, and clean up afterwards.',
'type' => 'Simpletest'
],
// Classname.
'Drupal\field\Tests\BulkDeleteTest',
@ -148,6 +169,7 @@ class TestInfoParsingTest extends UnitTestCase {
'group' => 'field',
'description' => 'Bulk delete storages and fields, and clean up afterwards.',
'requires' => ['module' => ['test']],
'type' => 'Simpletest'
],
// Classname.
'Drupal\field\Tests\BulkDeleteTest',
@ -169,6 +191,7 @@ class TestInfoParsingTest extends UnitTestCase {
'group' => 'field',
'description' => 'Bulk delete storages and fields, and clean up afterwards.',
'requires' => ['module' => ['test', 'test1', 'test2']],
'type' => 'Simpletest'
],
// Classname.
'Drupal\field\Tests\BulkDeleteTest',
@ -189,6 +212,7 @@ class TestInfoParsingTest extends UnitTestCase {
'name' => 'Drupal\field\Tests\BulkDeleteTest',
'group' => 'field',
'description' => 'Bulk delete storages and fields, and clean up afterwards. And the summary line continues and there is no gap to the annotation.',
'type' => 'Simpletest'
],
// Classname.
'Drupal\field\Tests\BulkDeleteTest',
@ -232,4 +256,29 @@ EOT;
$this->assertEmpty($info['description']);
}
/**
* @covers ::getPhpunitTestSuite
* @dataProvider providerTestGetPhpunitTestSuite
*/
public function testGetPhpunitTestSuite($classname, $expected) {
$this->assertEquals($expected, TestDiscovery::getPhpunitTestSuite($classname));
}
public function providerTestGetPhpunitTestSuite() {
$data = [];
$data['simpletest-webtest'] = ['\Drupal\rest\Tests\NodeTest', FALSE];
$data['simpletest-kerneltest'] = ['\Drupal\hal\Tests\FileNormalizeTest', FALSE];
$data['module-unittest'] = [static::class, 'Unit'];
$data['module-kerneltest'] = ['\Drupal\KernelTests\Core\Theme\TwigMarkupInterfaceTest', 'Kernel'];
$data['module-functionaltest'] = ['\Drupal\Tests\simpletest\Functional\BrowserTestBaseTest', 'Functional'];
$data['module-functionaljavascripttest'] = ['\Drupal\Tests\toolbar\FunctionalJavascript\ToolbarIntegrationTest', 'FunctionalJavascript'];
$data['core-unittest'] = ['\Drupal\Tests\ComposerIntegrationTest', 'Unit'];
$data['core-unittest2'] = ['Drupal\Tests\Core\DrupalTest', 'Unit'];
$data['core-kerneltest'] = ['\Drupal\KernelTests\KernelTestBaseTest', 'Kernel'];
$data['core-functionaltest'] = ['\Drupal\FunctionalTests\ExampleTest', 'Functional'];
$data['core-functionaljavascripttest'] = ['\Drupal\FunctionalJavascriptTests\ExampleTest', 'FunctionalJavascript'];
return $data;
}
}