function RecipeConfigStorageWrapperTest::testReadFails
Same name in other branches
- 10 core/tests/Drupal/Tests/Core/Recipe/RecipeConfigStorageWrapperTest.php \Drupal\Tests\Core\Recipe\RecipeConfigStorageWrapperTest::testReadFails()
Validate when neither storage can read a value.
File
-
core/
tests/ Drupal/ Tests/ Core/ Recipe/ RecipeConfigStorageWrapperTest.php, line 134
Class
- RecipeConfigStorageWrapperTest
- @coversDefaultClass \Drupal\Core\Recipe\RecipeConfigStorageWrapper @group Recipe
Namespace
Drupal\Tests\Core\RecipeCode
public function testReadFails() : void {
$a = $this->createMock(StorageInterface::class);
$a->expects($this->once())
->method('read')
->with('a_key')
->willReturn(FALSE);
$b = $this->createMock(StorageInterface::class);
$b->expects($this->once())
->method('read')
->with('a_key')
->willReturn(FALSE);
$storage = new RecipeConfigStorageWrapper($a, $b);
$this->assertFalse($storage->read('a_key'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.