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

@ -2,7 +2,7 @@
/**
* @file
* Contains \Drupal\system\Tests\Extension\ModuleHandlerTest.
* Contains \Drupal\Tests\system\Kernel\Extension\ModuleHandlerTest.
*/
namespace Drupal\Tests\system\Kernel\Extension;

View file

@ -0,0 +1,62 @@
<?php
/**
* @file
* Contains \Drupal\Tests\system\Kernel\PathHooksTest.
*/
namespace Drupal\Tests\system\Kernel;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Path\AliasManagerInterface;
use Drupal\KernelTests\KernelTestBase;
use Prophecy\Argument;
/**
* @group Drupal
*/
class PathHooksTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
static public $modules = ['system'];
/**
* Test system_path_*() correctly clears caches.
*/
public function testPathHooks() {
$this->installSchema('system', ['url_alias']);
$source = '/' . $this->randomMachineName();
$alias = '/' . $this->randomMachineName();
// Check system_path_insert();
$alias_manager = $this->prophesize(AliasManagerInterface::class);
$alias_manager->cacheClear(Argument::any())->shouldBeCalledTimes(1);
$alias_manager->cacheClear($source)->shouldBeCalledTimes(1);
\Drupal::getContainer()->set('path.alias_manager', $alias_manager->reveal());
$alias_storage = \Drupal::service('path.alias_storage');
$alias_storage->save($source, $alias);
$new_source = '/' . $this->randomMachineName();
$path = $alias_storage->load(['source' => $source]);
// Check system_path_update();
$alias_manager = $this->prophesize(AliasManagerInterface::class);
$alias_manager->cacheClear(Argument::any())->shouldBeCalledTimes(2);
$alias_manager->cacheClear($source)->shouldBeCalledTimes(1);
$alias_manager->cacheClear($new_source)->shouldBeCalledTimes(1);
\Drupal::getContainer()->set('path.alias_manager', $alias_manager->reveal());
$alias_storage->save($new_source, $alias, LanguageInterface::LANGCODE_NOT_SPECIFIED, $path['pid']);
// Check system_path_delete();
$alias_manager = $this->prophesize(AliasManagerInterface::class);
$alias_manager->cacheClear(Argument::any())->shouldBeCalledTimes(1);
$alias_manager->cacheClear($new_source)->shouldBeCalledTimes(1);
\Drupal::getContainer()->set('path.alias_manager', $alias_manager->reveal());
$alias_storage->delete(['pid' => $path['pid']]);
}
}

View file

@ -2,7 +2,7 @@
/**
* @file
* Contains \Drupal\system\Tests\PhpStorage\PhpStorageFactoryTest.
* Contains \Drupal\Tests\system\Kernel\PhpStorage\PhpStorageFactoryTest.
*/
namespace Drupal\Tests\system\Kernel\PhpStorage;

View file

@ -57,6 +57,7 @@ class DbDumpCommandTest extends KernelTestBase {
$this->assertContains("'name' => 'test", $output, 'Insert name field found');
$this->assertContains("'path' => 'test", $output, 'Insert path field found');
$this->assertContains("'pattern_outline' => 'test", $output, 'Insert pattern_outline field found');
$this->assertContains("// @codingStandardsIgnoreFile", $output);
}
/**