Update to Drupal 8.0.2. For more information, see https://www.drupal.org/drupal-8.0.2-release-notes

This commit is contained in:
Pantheon Automation 2016-01-06 16:31:26 -08:00 committed by Greg Anderson
parent 1a0e9d9fac
commit a6b049dd05
538 changed files with 5247 additions and 1594 deletions

View file

@ -217,8 +217,8 @@ class AccessManagerTest extends UnitTestCase {
$this->assertEquals(TRUE, $this->accessManager->check($route_matches['test_route_4'], $this->account));
$this->assertEquals(AccessResult::neutral(), $this->accessManager->check($route_matches['test_route_1'], $this->account, NULL, TRUE));
$this->assertEquals(AccessResult::allowed(), $this->accessManager->check($route_matches['test_route_2'], $this->account, NULL, TRUE));
$this->assertEquals(AccessResult::forbidden(), $this->accessManager->check($route_matches['test_route_3'], $this->account, NULL, TRUE));
$this->assertEquals(AccessResult::allowed(), $this->accessManager->check($route_matches['test_route_4'], $this->account, NULL, TRUE));
$this->assertEquals(AccessResult::forbidden(), $this->accessManager->check($route_matches['test_route_3'], $this->account, NULL, TRUE));
$this->assertEquals(AccessResult::allowed(), $this->accessManager->check($route_matches['test_route_4'], $this->account, NULL, TRUE));
}
/**

View file

@ -97,9 +97,9 @@ class LibraryDependencyResolverTest extends UnitTestCase {
[['test/nested_deps_c'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
[['test/nested_deps_a', 'test/nested_deps_b'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b']],
[['test/nested_deps_b', 'test/nested_deps_a'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b']],
[['test/nested_deps_a', 'test/nested_deps_c'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
[['test/nested_deps_b', 'test/nested_deps_c'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
[['test/nested_deps_c', 'test/nested_deps_a'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
[['test/nested_deps_a', 'test/nested_deps_c'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
[['test/nested_deps_b', 'test/nested_deps_c'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
[['test/nested_deps_c', 'test/nested_deps_a'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
[['test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
[['test/nested_deps_a', 'test/nested_deps_c', 'test/nested_deps_b'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
[['test/nested_deps_b', 'test/nested_deps_a', 'test/nested_deps_c'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
@ -107,7 +107,7 @@ class LibraryDependencyResolverTest extends UnitTestCase {
[['test/nested_deps_c', 'test/nested_deps_a', 'test/nested_deps_b'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
[['test/nested_deps_c', 'test/nested_deps_b', 'test/nested_deps_a'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c']],
// Complex dependencies, combining the above, with many intersections.
[['test/deps_c', 'test/nested_deps_b'], ['test/no_deps_b', 'test/no_deps_a', 'test/deps_c', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b']],
[['test/deps_c', 'test/nested_deps_b'], ['test/no_deps_b', 'test/no_deps_a', 'test/deps_c', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b']],
[['test/no_deps_a', 'test/deps_c', 'test/nested_deps_b'], ['test/no_deps_a', 'test/no_deps_b', 'test/deps_c', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b']],
[['test/nested_deps_b', 'test/deps_c', 'test/no_deps_c'], ['test/no_deps_a', 'test/deps_a', 'test/nested_deps_a', 'test/nested_deps_b', 'test/no_deps_b', 'test/deps_c', 'test/no_deps_c']],
];
@ -149,9 +149,9 @@ class LibraryDependencyResolverTest extends UnitTestCase {
[['test/nested_deps_c'], ['test/nested_deps_c']],
[['test/nested_deps_a', 'test/nested_deps_b'], ['test/nested_deps_b']],
[['test/nested_deps_b', 'test/nested_deps_a'], ['test/nested_deps_b']],
[['test/nested_deps_a', 'test/nested_deps_c'], ['test/nested_deps_c']],
[['test/nested_deps_b', 'test/nested_deps_c'], ['test/nested_deps_c']],
[['test/nested_deps_c', 'test/nested_deps_a'], ['test/nested_deps_c']],
[['test/nested_deps_a', 'test/nested_deps_c'], ['test/nested_deps_c']],
[['test/nested_deps_b', 'test/nested_deps_c'], ['test/nested_deps_c']],
[['test/nested_deps_c', 'test/nested_deps_a'], ['test/nested_deps_c']],
[['test/nested_deps_a', 'test/nested_deps_b', 'test/nested_deps_c'], ['test/nested_deps_c']],
[['test/nested_deps_a', 'test/nested_deps_c', 'test/nested_deps_b'], ['test/nested_deps_c']],
[['test/nested_deps_b', 'test/nested_deps_a', 'test/nested_deps_c'], ['test/nested_deps_c']],
@ -159,7 +159,7 @@ class LibraryDependencyResolverTest extends UnitTestCase {
[['test/nested_deps_c', 'test/nested_deps_a', 'test/nested_deps_b'], ['test/nested_deps_c']],
[['test/nested_deps_c', 'test/nested_deps_b', 'test/nested_deps_a'], ['test/nested_deps_c']],
// Complex dependencies, combining the above, with many intersections.
[['test/deps_c', 'test/nested_deps_b'], ['test/deps_c', 'test/nested_deps_b']],
[['test/deps_c', 'test/nested_deps_b'], ['test/deps_c', 'test/nested_deps_b']],
[['test/no_deps_a', 'test/deps_c', 'test/nested_deps_b'], ['test/deps_c', 'test/nested_deps_b']],
[['test/nested_deps_b', 'test/deps_c', 'test/no_deps_c'], ['test/nested_deps_b', 'test/deps_c', 'test/no_deps_c']],
];

View file

@ -56,7 +56,7 @@ class ConfigFactoryTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
$this->storage = $this->getMock('Drupal\Core\Config\StorageInterface');
$this->eventDispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->typedConfig = $this->getMock('\Drupal\Core\Config\TypedConfigManagerInterface');

View file

@ -58,7 +58,7 @@ class ConfigTest extends UnitTestCase {
*/
protected $cacheTagsInvalidator;
public function setUp() {
protected function setUp() {
$this->storage = $this->getMock('Drupal\Core\Config\StorageInterface');
$this->eventDispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->typedConfig = $this->getMock('\Drupal\Core\Config\TypedConfigManagerInterface');

View file

@ -163,6 +163,7 @@ class ConfigEntityTypeTest extends UnitTestCase {
'status' => 'status',
'dependencies' => 'dependencies',
'third_party_settings' => 'third_party_settings',
'_core' => '_core',
'id' => 'id',
'custom_property' => 'customProperty',
],

View file

@ -33,7 +33,7 @@ class StackedKernelPassTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
$this->stackedKernelPass = new StackedKernelPass();
$this->containerBuilder = new ContainerBuilder();
}

View file

@ -145,7 +145,7 @@ class EntityFieldManagerTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
parent::setUp();
$this->container = $this->prophesize(ContainerInterface::class);

View file

@ -76,13 +76,13 @@ class ModuleRouteSubscriberTest extends UnitTestCase {
return array(
array('enabled', array('_module_dependencies' => 'enabled'), FALSE),
array('disabled', array('_module_dependencies' => 'disabled'), TRUE),
array('enabled_or', array('_module_dependencies' => 'disabled,enabled'), FALSE),
array('enabled_or', array('_module_dependencies' => 'enabled,disabled'), FALSE),
array('disabled_or', array('_module_dependencies' => 'disabled,disabled'), TRUE),
array('enabled_and', array('_module_dependencies' => 'enabled+enabled'), FALSE),
array('enabled_and', array('_module_dependencies' => 'enabled+disabled'), TRUE),
array('enabled_and', array('_module_dependencies' => 'disabled+enabled'), TRUE),
array('disabled_and', array('_module_dependencies' => 'disabled+disabled'), TRUE),
array('enabled_or', array('_module_dependencies' => 'disabled,enabled'), FALSE),
array('enabled_or', array('_module_dependencies' => 'enabled,disabled'), FALSE),
array('disabled_or', array('_module_dependencies' => 'disabled,disabled'), TRUE),
array('enabled_and', array('_module_dependencies' => 'enabled+enabled'), FALSE),
array('enabled_and', array('_module_dependencies' => 'enabled+disabled'), TRUE),
array('enabled_and', array('_module_dependencies' => 'disabled+enabled'), TRUE),
array('disabled_and', array('_module_dependencies' => 'disabled+disabled'), TRUE),
array('no_dependencies', array(), FALSE),
);
}

View file

@ -33,7 +33,7 @@ class PsrResponseSubscriberTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
$factory = $this->getMock('Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface', [], [], '', NULL);
$factory
->expects($this->any())

View file

@ -14,8 +14,6 @@ use Drupal\Tests\UnitTestCase;
/**
* @coversDefaultClass \Drupal\Core\Form\FormCache
* @group Form
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
*/
class FormCacheTest extends UnitTestCase {
@ -89,6 +87,16 @@ class FormCacheTest extends UnitTestCase {
*/
protected $requestPolicy;
/**
* {@inheritdoc}
*/
protected $runTestInSeparateProcess = TRUE;
/**
* {@inheritdoc}
*/
protected $preserveGlobalState = FALSE;
/**
* {@inheritdoc}
*/

View file

@ -27,7 +27,7 @@ class ClientFactoryTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
$stack = $this->getMockBuilder('GuzzleHttp\HandlerStack')
->disableOriginalConstructor()
->getMock();

View file

@ -47,7 +47,7 @@ class ImageTest extends UnitTestCase {
protected $toolkitOperation;
/**
* @inheritdoc
* {@inheritdoc}
*/
protected function setUp() {
// Use the Druplicon image.

View file

@ -32,7 +32,7 @@ class ChainRequestPolicyTest extends UnitTestCase {
*/
protected $request;
public function setUp() {
protected function setUp() {
$this->policy = new ChainRequestPolicy();
$this->request = new Request();
}

View file

@ -40,7 +40,7 @@ class ChainResponsePolicyTest extends UnitTestCase {
*/
protected $response;
public function setUp() {
protected function setUp() {
$this->policy = new ChainResponsePolicy();
$this->response = new Response();
$this->request = new Request();

View file

@ -24,7 +24,7 @@ class CommandLineOrUnsafeMethodTest extends UnitTestCase {
*/
protected $policy;
public function setUp() {
protected function setUp() {
// Note that it is necessary to partially mock the class under test in
// order to disable the isCli-check.
$this->policy = $this->getMock('Drupal\Core\PageCache\RequestPolicy\CommandLineOrUnsafeMethod', array('isCli'));

View file

@ -32,7 +32,7 @@ class NoSessionOpenTest extends UnitTestCase {
*/
protected $policy;
public function setUp() {
protected function setUp() {
$this->sessionConfiguration = $this->getMock('Drupal\Core\Session\SessionConfigurationInterface');
$this->policy = new RequestPolicy\NoSessionOpen($this->sessionConfiguration);
}

View file

@ -43,7 +43,7 @@ class ContextTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
parent::setUp();
$this->typedDataManager = $this->getMockBuilder('Drupal\Core\TypedData\TypedDataManager')

View file

@ -49,7 +49,7 @@ class AccessAwareRouterTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
parent::setUp();
$this->route = new Route('test');
$this->accessManager = $this->getMock('Drupal\Core\Access\AccessManagerInterface');

View file

@ -32,7 +32,7 @@ class WriteSafeSessionHandlerTest extends UnitTestCase {
*/
protected $sessionHandler;
public function setUp() {
protected function setUp() {
$this->wrappedSessionHandler = $this->getMock('SessionHandlerInterface');
$this->sessionHandler = new WriteSafeSessionHandler($this->wrappedSessionHandler);
}

View file

@ -27,7 +27,7 @@ class ReverseProxyMiddlewareTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
$this->mockHttpKernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface');
}

View file

@ -7,6 +7,7 @@
namespace Drupal\Tests\Core\Template;
use Drupal\Core\Template\Attribute;
use Drupal\Core\Template\TwigSandboxPolicy;
use Drupal\Core\Template\Loader\StringLoader;
use Drupal\Tests\UnitTestCase;
@ -64,6 +65,13 @@ class TwigSandboxTest extends UnitTestCase {
];
}
/**
* Tests that white listed classes can be extended.
*/
public function testExtendedClass() {
$this->twig->render('{{ attribute.addClass("kitten") }}', ['attribute' => new TestAttribute()]);
}
/**
* Tests that prefixed methods can be called from within Twig templates.
*
@ -133,3 +141,5 @@ class TwigSandboxTest extends UnitTestCase {
}
}
class TestAttribute extends Attribute {}