Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / tests / Drupal / Tests / Component / DependencyInjection / Dumper / OptimizedPhpArrayDumperTest.php
index 3c447527487cb68628c57f28ba2e29cdfca7b44a..2ed2e74158e99a1e10be19a92c4b7fc186381bd5 100644 (file)
@@ -68,7 +68,7 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper {
       $this->containerBuilder->getAliases()->willReturn([]);
       $this->containerBuilder->getParameterBag()->willReturn(new ParameterBag());
       $this->containerBuilder->getDefinitions()->willReturn(NULL);
-      $this->containerBuilder->isFrozen()->willReturn(TRUE);
+      $this->containerBuilder->isCompiled()->willReturn(TRUE);
 
       $definition = [];
       $definition['aliases'] = [];
@@ -147,7 +147,7 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper {
 
       $parameter_bag = new ParameterBag($parameters);
       $this->containerBuilder->getParameterBag()->willReturn($parameter_bag);
-      $this->containerBuilder->isFrozen()->willReturn($is_frozen);
+      $this->containerBuilder->isCompiled()->willReturn($is_frozen);
 
       if (isset($parameters['reference'])) {
         $definition = new Definition('\stdClass');
@@ -545,7 +545,12 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper {
       $services['bar'] = $bar_definition;
 
       $this->containerBuilder->getDefinitions()->willReturn($services);
-      $this->setExpectedException(InvalidArgumentException::class);
+      if (method_exists($this, 'expectException')) {
+        $this->expectException(InvalidArgumentException::class);
+      }
+      else {
+        $this->setExpectedException(InvalidArgumentException::class);
+      }
       $this->dumper->getArray();
     }
 
@@ -562,7 +567,12 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper {
       $services['bar'] = $bar_definition;
 
       $this->containerBuilder->getDefinitions()->willReturn($services);
-      $this->setExpectedException(RuntimeException::class);
+      if (method_exists($this, 'expectException')) {
+        $this->expectException(RuntimeException::class);
+      }
+      else {
+        $this->setExpectedException(RuntimeException::class);
+      }
       $this->dumper->getArray();
     }
 
@@ -579,7 +589,12 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper {
       $services['bar'] = $bar_definition;
 
       $this->containerBuilder->getDefinitions()->willReturn($services);
-      $this->setExpectedException(RuntimeException::class);
+      if (method_exists($this, 'expectException')) {
+        $this->expectException(RuntimeException::class);
+      }
+      else {
+        $this->setExpectedException(RuntimeException::class);
+      }
       $this->dumper->getArray();
     }
 
@@ -596,7 +611,12 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper {
       $services['bar'] = $bar_definition;
 
       $this->containerBuilder->getDefinitions()->willReturn($services);
-      $this->setExpectedException(RuntimeException::class);
+      if (method_exists($this, 'expectException')) {
+        $this->expectException(RuntimeException::class);
+      }
+      else {
+        $this->setExpectedException(RuntimeException::class);
+      }
       $this->dumper->getArray();
     }