Update core 8.3.0
This commit is contained in:
parent
da7a7918f8
commit
cd7a898e66
6144 changed files with 132297 additions and 87747 deletions
|
@ -104,18 +104,18 @@ abstract class UnitTestCase extends \PHPUnit_Framework_TestCase {
|
|||
* @return \PHPUnit_Framework_MockObject_MockBuilder
|
||||
* A MockBuilder object for the ConfigFactory with the desired return values.
|
||||
*/
|
||||
public function getConfigFactoryStub(array $configs = array()) {
|
||||
$config_get_map = array();
|
||||
$config_editable_map = array();
|
||||
public function getConfigFactoryStub(array $configs = []) {
|
||||
$config_get_map = [];
|
||||
$config_editable_map = [];
|
||||
// Construct the desired configuration object stubs, each with its own
|
||||
// desired return map.
|
||||
foreach ($configs as $config_name => $config_values) {
|
||||
$map = array();
|
||||
$map = [];
|
||||
foreach ($config_values as $key => $value) {
|
||||
$map[] = array($key, $value);
|
||||
$map[] = [$key, $value];
|
||||
}
|
||||
// Also allow to pass in no argument.
|
||||
$map[] = array('', $config_values);
|
||||
$map[] = ['', $config_values];
|
||||
|
||||
$immutable_config_object = $this->getMockBuilder('Drupal\Core\Config\ImmutableConfig')
|
||||
->disableOriginalConstructor()
|
||||
|
@ -123,7 +123,7 @@ abstract class UnitTestCase extends \PHPUnit_Framework_TestCase {
|
|||
$immutable_config_object->expects($this->any())
|
||||
->method('get')
|
||||
->will($this->returnValueMap($map));
|
||||
$config_get_map[] = array($config_name, $immutable_config_object);
|
||||
$config_get_map[] = [$config_name, $immutable_config_object];
|
||||
|
||||
$mutable_config_object = $this->getMockBuilder('Drupal\Core\Config\Config')
|
||||
->disableOriginalConstructor()
|
||||
|
@ -131,7 +131,7 @@ abstract class UnitTestCase extends \PHPUnit_Framework_TestCase {
|
|||
$mutable_config_object->expects($this->any())
|
||||
->method('get')
|
||||
->will($this->returnValueMap($map));
|
||||
$config_editable_map[] = array($config_name, $mutable_config_object);
|
||||
$config_editable_map[] = [$config_name, $mutable_config_object];
|
||||
}
|
||||
// Construct a config factory with the array of configuration object stubs
|
||||
// as its return map.
|
||||
|
@ -207,7 +207,7 @@ abstract class UnitTestCase extends \PHPUnit_Framework_TestCase {
|
|||
$translation = $this->getMock('Drupal\Core\StringTranslation\TranslationInterface');
|
||||
$translation->expects($this->any())
|
||||
->method('translate')
|
||||
->willReturnCallback(function ($string, array $args = array(), array $options = array()) use ($translation) {
|
||||
->willReturnCallback(function ($string, array $args = [], array $options = []) use ($translation) {
|
||||
return new TranslatableMarkup($string, $args, $options, $translation);
|
||||
});
|
||||
$translation->expects($this->any())
|
||||
|
|
Reference in a new issue