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:
parent
1a0e9d9fac
commit
a6b049dd05
538 changed files with 5247 additions and 1594 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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']],
|
||||
];
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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',
|
||||
],
|
||||
|
|
|
@ -33,7 +33,7 @@ class StackedKernelPassTest extends UnitTestCase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
$this->stackedKernelPass = new StackedKernelPass();
|
||||
$this->containerBuilder = new ContainerBuilder();
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ class EntityFieldManagerTest extends UnitTestCase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
$this->container = $this->prophesize(ContainerInterface::class);
|
||||
|
|
|
@ -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),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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}
|
||||
*/
|
||||
|
|
|
@ -27,7 +27,7 @@ class ClientFactoryTest extends UnitTestCase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
$stack = $this->getMockBuilder('GuzzleHttp\HandlerStack')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
|
|
@ -47,7 +47,7 @@ class ImageTest extends UnitTestCase {
|
|||
protected $toolkitOperation;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
// Use the Druplicon image.
|
||||
|
|
|
@ -32,7 +32,7 @@ class ChainRequestPolicyTest extends UnitTestCase {
|
|||
*/
|
||||
protected $request;
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
$this->policy = new ChainRequestPolicy();
|
||||
$this->request = new Request();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class ReverseProxyMiddlewareTest extends UnitTestCase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
$this->mockHttpKernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface');
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {}
|
||||
|
|
Reference in a new issue