Update to Drupal 8.1.1. For more information, see https://www.drupal.org/node/2718713
This commit is contained in:
parent
c0a0d5a94c
commit
9eae24d844
669 changed files with 3873 additions and 1553 deletions
|
@ -441,7 +441,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase {
|
|||
*/
|
||||
public function testGetForInstantiationWithVariousArgumentLengths() {
|
||||
$args = array();
|
||||
for ($i=0; $i < 12; $i++) {
|
||||
for ($i = 0; $i < 12; $i++) {
|
||||
$instantiation_service = $this->container->get('service_test_instantiation_'. $i);
|
||||
$this->assertEquals($args, $instantiation_service->getArguments());
|
||||
$args[] = 'arg_' . $i;
|
||||
|
@ -480,7 +480,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase {
|
|||
*/
|
||||
public function testGetForFactoryClass() {
|
||||
$service = $this->container->get('service.provider');
|
||||
$factory_service= $this->container->get('factory_class');
|
||||
$factory_service = $this->container->get('factory_class');
|
||||
|
||||
$this->assertInstanceOf(get_class($service), $factory_service);
|
||||
$this->assertEquals('bar', $factory_service->getSomeParameter(), 'Correct parameter was passed via the factory class instantiation.');
|
||||
|
@ -892,7 +892,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
// Test multiple arguments.
|
||||
$args = array();
|
||||
for ($i=0; $i < 12; $i++) {
|
||||
for ($i = 0; $i < 12; $i++) {
|
||||
$services['service_test_instantiation_' . $i] = array(
|
||||
'class' => '\Drupal\Tests\Component\DependencyInjection\MockInstantiationService',
|
||||
// Also test a collection that does not need resolving.
|
||||
|
|
|
@ -113,11 +113,11 @@ class DrupalComponentTest extends UnitTestCase {
|
|||
$file_uri = vfsStream::url('root/Test.php');
|
||||
|
||||
try {
|
||||
$pass = true;
|
||||
$pass = TRUE;
|
||||
$this->assertNoCoreUsage($file_uri);
|
||||
}
|
||||
catch (\PHPUnit_Framework_AssertionFailedError $e) {
|
||||
$pass = false;
|
||||
$pass = FALSE;
|
||||
}
|
||||
$this->assertEquals($expected_pass, $pass, $expected_pass ?
|
||||
'Test caused a false positive' :
|
||||
|
|
|
@ -37,7 +37,7 @@ abstract class MTimeProtectedFileStorageBase extends PhpStorageTestBase {
|
|||
$this->secret = $this->randomMachineName();
|
||||
|
||||
$this->settings = array(
|
||||
'directory' => $this->directory,
|
||||
'directory' => $this->directory,
|
||||
'bin' => 'test',
|
||||
'secret' => $this->secret,
|
||||
);
|
||||
|
@ -69,7 +69,7 @@ abstract class MTimeProtectedFileStorageBase extends PhpStorageTestBase {
|
|||
$php = new $this->storageClass($this->settings);
|
||||
$name = 'simpletest.php';
|
||||
$php->save($name, '<?php');
|
||||
$expected_root_directory = $this->directory . '/test';
|
||||
$expected_root_directory = $this->directory . '/test';
|
||||
if (substr($name, -4) === '.php') {
|
||||
$expected_directory = $expected_root_directory . '/' . substr($name, 0, -4);
|
||||
}
|
||||
|
|
|
@ -154,4 +154,3 @@ class DefaultFactoryTest extends UnitTestCase {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ namespace Drupal\Tests\Component\Plugin\Discovery;
|
|||
use Drupal\Tests\UnitTestCase;
|
||||
|
||||
/**
|
||||
* @coversDefaultClass Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait
|
||||
* @uses Drupal\Component\Plugin\Discovery\DiscoveryTrait
|
||||
* @coversDefaultClass \Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait
|
||||
* @uses \Drupal\Component\Plugin\Discovery\DiscoveryTrait
|
||||
* @group Plugin
|
||||
*/
|
||||
class DiscoveryCachedTraitTest extends UnitTestCase {
|
||||
|
|
|
@ -6,7 +6,7 @@ use Drupal\Tests\UnitTestCase;
|
|||
|
||||
/**
|
||||
* @group Plugin
|
||||
* @coversDefaultClass Drupal\Component\Plugin\Discovery\DiscoveryTrait
|
||||
* @coversDefaultClass \Drupal\Component\Plugin\Discovery\DiscoveryTrait
|
||||
*/
|
||||
class DiscoveryTraitTest extends UnitTestCase {
|
||||
|
||||
|
@ -58,9 +58,9 @@ class DiscoveryTraitTest extends UnitTestCase {
|
|||
|
||||
/**
|
||||
* @covers ::doGetDefinition
|
||||
* @expectedException Drupal\Component\Plugin\Exception\PluginNotFoundException
|
||||
* @expectedException \Drupal\Component\Plugin\Exception\PluginNotFoundException
|
||||
* @dataProvider providerDoGetDefinitionException
|
||||
* @uses Drupal\Component\Plugin\Exception\PluginNotFoundException
|
||||
* @uses \Drupal\Component\Plugin\Exception\PluginNotFoundException
|
||||
*/
|
||||
public function testDoGetDefinitionException($expected, $definitions, $plugin_id) {
|
||||
// Mock the trait.
|
||||
|
@ -96,9 +96,9 @@ class DiscoveryTraitTest extends UnitTestCase {
|
|||
|
||||
/**
|
||||
* @covers ::getDefinition
|
||||
* @expectedException Drupal\Component\Plugin\Exception\PluginNotFoundException
|
||||
* @expectedException \Drupal\Component\Plugin\Exception\PluginNotFoundException
|
||||
* @dataProvider providerDoGetDefinitionException
|
||||
* @uses Drupal\Component\Plugin\Exception\PluginNotFoundException
|
||||
* @uses \Drupal\Component\Plugin\Exception\PluginNotFoundException
|
||||
*/
|
||||
public function testGetDefinitionException($expected, $definitions, $plugin_id) {
|
||||
// Since getDefinition is a wrapper around doGetDefinition(), we can re-use
|
||||
|
|
|
@ -6,7 +6,7 @@ use Drupal\Tests\UnitTestCase;
|
|||
|
||||
/**
|
||||
* @group Plugin
|
||||
* @coversDefaultClass Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator
|
||||
* @coversDefaultClass \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator
|
||||
*/
|
||||
class StaticDiscoveryDecoratorTest extends UnitTestCase {
|
||||
|
||||
|
@ -17,7 +17,7 @@ class StaticDiscoveryDecoratorTest extends UnitTestCase {
|
|||
* \Callable in the mock object. The return value of this callback is
|
||||
* never used.
|
||||
*
|
||||
* @return mock
|
||||
* @return \PHPUnit_Framework_MockObject_MockObject
|
||||
* Mocked object with expectation of registerDefinitionsCallback() being
|
||||
* called once.
|
||||
*/
|
||||
|
|
|
@ -14,7 +14,7 @@ use Drupal\Tests\UnitTestCase;
|
|||
|
||||
/**
|
||||
* @group Plugin
|
||||
* @coversDefaultClass Drupal\Component\Plugin\Factory\ReflectionFactory
|
||||
* @coversDefaultClass \Drupal\Component\Plugin\Factory\ReflectionFactory
|
||||
*/
|
||||
class ReflectionFactoryTest extends UnitTestCase {
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class PlainTextOutputTest extends UnitTestCase {
|
|||
$safe_string = $this->prophesize(MarkupInterface::class);
|
||||
$safe_string->__toString()->willReturn('<em>"this"</em>');
|
||||
$safe_string = $safe_string->reveal();
|
||||
$data['escaped-html-with-quotes-and-placeholders'] = [$expected, 'The @tag tag makes your text look like @result.', ['@tag' =>'<em>', '@result' => $safe_string]];
|
||||
$data['escaped-html-with-quotes-and-placeholders'] = [$expected, 'The @tag tag makes your text look like @result.', ['@tag' => '<em>', '@result' => $safe_string]];
|
||||
|
||||
$safe_string = $this->prophesize(MarkupInterface::class);
|
||||
$safe_string->__toString()->willReturn($string);
|
||||
|
|
|
@ -320,4 +320,4 @@ class HtmlTest extends UnitTestCase {
|
|||
$result = Html::serialize($document);
|
||||
$this->assertSame('', $result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,8 +70,8 @@ class NumberTest extends UnitTestCase {
|
|||
|
||||
// Valid float steps.
|
||||
array(42, 10.5, TRUE),
|
||||
array(1, 1/3, TRUE),
|
||||
array(-100, 100/7, TRUE),
|
||||
array(1, 1 / 3, TRUE),
|
||||
array(-100, 100 / 7, TRUE),
|
||||
array(1000, -10, TRUE),
|
||||
|
||||
// Valid and very small float steps.
|
||||
|
@ -83,7 +83,7 @@ class NumberTest extends UnitTestCase {
|
|||
array(-10, 4, FALSE),
|
||||
|
||||
// Invalid float steps.
|
||||
array(6, 5/7, FALSE),
|
||||
array(6, 5 / 7, FALSE),
|
||||
array(10.3, 10.25, FALSE),
|
||||
|
||||
// Step mismatches very close to being valid.
|
||||
|
@ -102,12 +102,12 @@ class NumberTest extends UnitTestCase {
|
|||
// Try obvious fits.
|
||||
array(11.3, 10.3, 1, TRUE),
|
||||
array(100, 10, 50, TRUE),
|
||||
array(-100, 90/7, -10, TRUE),
|
||||
array(2/7 + 5/9, 1/7, 5/9, TRUE),
|
||||
array(-100, 90 / 7, -10, TRUE),
|
||||
array(2 / 7 + 5 / 9, 1 / 7, 5 / 9, TRUE),
|
||||
|
||||
// Ensure a small offset is still invalid.
|
||||
array(10.3, 10.3, 0.0001, FALSE),
|
||||
array(1/5, 1/7, 1/11, FALSE),
|
||||
array(1 / 5, 1 / 7, 1 / 11, FALSE),
|
||||
|
||||
// Try negative values and offsets.
|
||||
array(1000, 10, -5, FALSE),
|
||||
|
|
Reference in a new issue