public function FlysystemFactoryTest::testEnsureReturnsErrors in Flysystem 3.0.x
Same name and namespace in other branches
- 8 tests/src/Unit/FlysystemFactoryTest.php \Drupal\Tests\flysystem\Unit\FlysystemFactoryTest::testEnsureReturnsErrors()
- 3.x tests/src/Unit/FlysystemFactoryTest.php \Drupal\Tests\flysystem\Unit\FlysystemFactoryTest::testEnsureReturnsErrors()
- 2.0.x tests/src/Unit/FlysystemFactoryTest.php \Drupal\Tests\flysystem\Unit\FlysystemFactoryTest::testEnsureReturnsErrors()
@covers ::ensure
File
- tests/
src/ Unit/ FlysystemFactoryTest.php, line 164
Class
- FlysystemFactoryTest
- @coversDefaultClass \Drupal\flysystem\FlysystemFactory @group flysystem
Namespace
Drupal\Tests\flysystem\UnitCode
public function testEnsureReturnsErrors() {
new Settings([
'flysystem' => [
'testscheme' => [
'driver' => 'testdriver',
],
],
]);
$this->plugin
->ensure(FALSE)
->willReturn([
[
'severity' => 'bad',
'message' => 'Something bad',
'context' => [],
],
]);
$errors = $this
->getFactory()
->ensure();
$this
->assertSame('Something bad', $errors['testscheme'][0]['message']);
}