public function ConfigFormTest::testCopyFileException in Flysystem 8
Same name and namespace in other branches
- 3.x tests/src/Unit/Form/ConfigFormTest.php \Drupal\Tests\flysystem\Unit\Form\ConfigFormTest::testCopyFileException()
- 2.0.x tests/src/Unit/Form/ConfigFormTest.php \Drupal\Tests\flysystem\Unit\Form\ConfigFormTest::testCopyFileException()
- 3.0.x tests/src/Unit/Form/ConfigFormTest.php \Drupal\Tests\flysystem\Unit\Form\ConfigFormTest::testCopyFileException()
@covers ::copyFile
File
- tests/
src/ Unit/ Form/ ConfigFormTest.php, line 214
Class
- ConfigFormTest
- @coversDefaultClass \Drupal\flysystem\Form\ConfigForm @group flysystem
Namespace
Drupal\Tests\flysystem\Unit\FormCode
public function testCopyFileException() {
$context = [];
ConfigForm::copyFile('from_empty', 'to_empty', 'does_not_exist.txt', $context);
$this
->assertSame(2, count($context['results']['errors']));
$this
->assertTrue(strpos($context['results']['errors'][0][0], 'An eror occured while copying') !== FALSE);
$this
->assertTrue(strpos($context['results']['errors'][1], 'File not found at path') !== FALSE);
}