Security update for Core, with self-updated composer
[yaffs-website] / web / core / tests / Drupal / Tests / Component / DependencyInjection / Dumper / PhpArrayDumperTest.php
1 <?php
2
3 namespace Drupal\Tests\Component\DependencyInjection\Dumper;
4
5 use Symfony\Component\DependencyInjection\ContainerInterface;
6
7 /**
8  * @coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper
9  * @group DependencyInjection
10  */
11 class PhpArrayDumperTest extends OptimizedPhpArrayDumperTest {
12
13   /**
14    * {@inheritdoc}
15    */
16   protected function setUp() {
17     $this->machineFormat = FALSE;
18     $this->dumperClass = '\Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper';
19     parent::setUp();
20   }
21
22   /**
23    * {@inheritdoc}
24    */
25   protected function serializeDefinition(array $service_definition) {
26     return $service_definition;
27   }
28
29   /**
30    * {@inheritdoc}
31    */
32   protected function getServiceCall($id, $invalid_behavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
33     if ($invalid_behavior !== ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
34       return sprintf('@?%s', $id);
35     }
36
37     return sprintf('@%s', $id);
38   }
39
40   /**
41    * {@inheritdoc}
42    */
43   protected function getParameterCall($name) {
44     return '%' . $name . '%';
45   }
46
47   /**
48    * {@inheritdoc}
49    */
50   protected function getCollection($collection, $resolve = TRUE) {
51     return $collection;
52   }
53
54 }