You are here

public function TwigSandboxTest::getTwigEntityDangerousMethods in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php \Drupal\Tests\Core\Template\TwigSandboxTest::getTwigEntityDangerousMethods()
  2. 10 core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php \Drupal\Tests\Core\Template\TwigSandboxTest::getTwigEntityDangerousMethods()

Data provider for ::testEntityDangerousMethods.

Return value

array

File

core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php, line 60
Contains \Drupal\Tests\Core\Template\TwigSandboxTest.

Class

TwigSandboxTest
Tests the twig sandbox policy.

Namespace

Drupal\Tests\Core\Template

Code

public function getTwigEntityDangerousMethods() {
  return [
    [
      '{{ entity.delete }}',
    ],
    [
      '{{ entity.save }}',
    ],
    [
      '{{ entity.create }}',
    ],
  ];
}