diff --git a/core/lib/Drupal/Core/Config/ConfigManager.php b/core/lib/Drupal/Core/Config/ConfigManager.php index fb8f658..eb59497 100644 --- a/core/lib/Drupal/Core/Config/ConfigManager.php +++ b/core/lib/Drupal/Core/Config/ConfigManager.php @@ -155,11 +155,15 @@ public function diff(StorageInterface $source_storage, StorageInterface $target_ // Check for new or removed files. if ($source_data === array('false')) { // Added file. - $source_data = array($this->t('File added')); + // Cast the result of t() to a string, as the diff engine doesn't know + // about objects. + $source_data = array((string) $this->t('File added')); } if ($target_data === array('false')) { // Deleted file. - $target_data = array($this->t('File removed')); + // Cast the result of t() to a string, as the diff engine doesn't know + // about objects. + $target_data = array((string) $this->t('File removed')); } return new Diff($source_data, $target_data); diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh index 6f11827..1b93148 100755 --- a/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -589,6 +589,12 @@ function simpletest_script_execute_batch($test_classes) { * Run a group of phpunit tests. */ function simpletest_script_run_phpunit($test_id, $class) { + + $reflection = new \ReflectionClass($class); + if ($reflection->hasProperty('runLimit')) { + set_time_limit($reflection->getStaticPropertyValue('runLimit')); + } + $results = simpletest_run_phpunit_tests($test_id, array($class)); simpletest_process_phpunit_results($results); diff --git a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php index 8efed71..5ac0cb6 100644 --- a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php +++ b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php @@ -27,12 +27,12 @@ class DefaultConfigTest extends KernelTestBase { /** * {@inheritdoc} */ - public static $modules = ['system', 'user']; + protected static $timeLimit = 500; /** - * Time limit for the test. + * {@inheritdoc} */ - protected $timeLimit = 120; + public static $modules = ['system', 'user']; /** * {@inheritdoc} @@ -62,10 +62,6 @@ protected function setUp() { * @dataProvider providerTestModuleConfig */ public function testModuleConfig($module) { - // We're testing a lot of modules. Allow sufficient time for the test to - // run. - drupal_set_time_limit($this->timeLimit); - /** @var \Drupal\Core\Extension\ModuleInstallerInterface $module_installer */ $module_installer = $this->container->get('module_installer'); /** @var \Drupal\Core\Config\StorageInterface $active_config_storage */