Update to Drupal 8.1.5. For more information, see https://www.drupal.org/project/drupal/releases/8.1.5

This commit is contained in:
Pantheon Automation 2016-07-07 09:44:38 -07:00 committed by Greg Anderson
parent 13b6ca7cc2
commit 38ba7c357d
342 changed files with 7814 additions and 1534 deletions

View file

@ -222,6 +222,17 @@ class ContainerTest extends \PHPUnit_Framework_TestCase {
$this->assertTrue($this->container->has('another.service'));
}
/**
* Tests that Container::has() for aliased services works properly.
*
* @covers ::has
*/
public function testHasForAliasedService() {
$service = $this->container->has('service.provider');
$aliased_service = $this->container->has('service.provider_alias');
$this->assertSame($service, $aliased_service);
}
/**
* Tests that Container::get() for circular dependencies works properly.
* @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException

View file

@ -493,6 +493,60 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper {
$this->dumper->getArray();
}
/**
* Tests that references to aliases work correctly.
*
* @covers ::getReferenceCall
*
* @dataProvider publicPrivateDataProvider
*/
public function testGetServiceDefinitionWithReferenceToAlias($public) {
$bar_definition = new Definition('\stdClass');
$bar_definition_php_array = array(
'class' => '\stdClass',
);
if (!$public) {
$bar_definition->setPublic(FALSE);
$bar_definition_php_array['public'] = FALSE;
}
$bar_definition_php_array['arguments_count'] = 0;
$services['bar'] = $bar_definition;
$aliases['bar.alias'] = 'bar';
$foo = new Definition('\stdClass');
$foo->addArgument(new Reference('bar.alias'));
$services['foo'] = $foo;
$this->containerBuilder->getAliases()->willReturn($aliases);
$this->containerBuilder->getDefinitions()->willReturn($services);
$this->containerBuilder->getDefinition('bar')->willReturn($bar_definition);
$dump = $this->dumper->getArray();
if ($public) {
$service_definition = $this->getServiceCall('bar');
}
else {
$service_definition = $this->getPrivateServiceCall('bar', $bar_definition_php_array, TRUE);
}
$data = array(
'class' => '\stdClass',
'arguments' => $this->getCollection(array(
$service_definition,
)),
'arguments_count' => 1,
);
$this->assertEquals($this->serializeDefinition($data), $dump['services']['foo'], 'Expected definition matches dump.');
}
public function publicPrivateDataProvider() {
return array(
array(TRUE),
array(FALSE),
);
}
/**
* Tests that getDecoratedService() is unsupported.
*

View file

@ -35,11 +35,10 @@ class ImageTest extends UnitTestCase {
*
* @return array
* Keyed array containing:
* - 'input' - Array which contains input for
* Image::scaleDimensions().
* - 'output' - Array which contains expected output after passing
* through Image::scaleDimensions. Also contains a boolean
* 'return_value' which should match the expected return value.
* - 'input' - Array which contains input for Image::scaleDimensions().
* - 'output' - Array which contains expected output after passing
* through Image::scaleDimensions. Also contains a boolean
* 'return_value' which should match the expected return value.
*
* @see testScaleDimensions()
*/

View file

@ -474,11 +474,11 @@ class UnicodeTest extends UnitTestCase {
/**
* Provides data for self::testValidateUtf8().
*
* Invalid UTF-8 examples sourced from http://stackoverflow.com/a/11709412/109119.
*
* @return array
* An array of arrays, each containing the parameters for
* self::testValidateUtf8().
*
* Invalid UTF-8 examples sourced from http://stackoverflow.com/a/11709412/109119.
*/
public function providerTestValidateUtf8() {
return array(

View file

@ -77,7 +77,7 @@ class UuidTest extends UnitTestCase {
* Dataprovider for UUID instance tests.
*
* @return array
* An array of arrays containing
* An array of arrays containing
* - The Uuid to check against.
* - (bool) Whether or not the Uuid is valid.
* - Failure message.