function RecipeConfigStorageWrapperTest::testReadFromA
Validate that we read from storage A first.
File
- 
              core/tests/ Drupal/ Tests/ Core/ Recipe/ RecipeConfigStorageWrapperTest.php, line 103 
Class
- RecipeConfigStorageWrapperTest
- @coversDefaultClass \Drupal\Core\Recipe\RecipeConfigStorageWrapper[[api-linebreak]] @group Recipe
Namespace
Drupal\Tests\Core\RecipeCode
public function testReadFromA() : void {
  $a = $this->createMock(StorageInterface::class);
  $value = [
    'a_value',
  ];
  $a->expects($this->once())
    ->method('read')
    ->with('a_key')
    ->willReturn($value);
  $b = $this->createMock(StorageInterface::class);
  $b->expects($this->never())
    ->method('read');
  $storage = new RecipeConfigStorageWrapper($a, $b);
  $this->assertSame($value, $storage->read('a_key'));
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
