function RecipeConfigStorageWrapperTest::testEncode

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Recipe/RecipeConfigStorageWrapperTest.php \Drupal\Tests\Core\Recipe\RecipeConfigStorageWrapperTest::testEncode()
  2. 10 core/tests/Drupal/Tests/Core/Recipe/RecipeConfigStorageWrapperTest.php \Drupal\Tests\Core\Recipe\RecipeConfigStorageWrapperTest::testEncode()

Test that we only use storage A's encode method.

File

core/tests/Drupal/Tests/Core/Recipe/RecipeConfigStorageWrapperTest.php, line 207

Class

RecipeConfigStorageWrapperTest
Tests Drupal\Core\Recipe\RecipeConfigStorageWrapper.

Namespace

Drupal\Tests\Core\Recipe

Code

public function testEncode() : void {
  $a = $this->createMock(StorageInterface::class);
  $b = $this->createMock(StorageInterface::class);
  $storage = new RecipeConfigStorageWrapper($a, $b);
  $this->expectException(\BadMethodCallException::class);
  $storage->encode([
    'value',
  ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.