public function InstallFunctionsTest::setUp in Flysystem 8
Same name and namespace in other branches
- 3.x tests/src/Unit/InstallFunctionsTest.php \Drupal\Tests\flysystem\Unit\InstallFunctionsTest::setUp()
- 2.0.x tests/src/Unit/InstallFunctionsTest.php \Drupal\Tests\flysystem\Unit\InstallFunctionsTest::setUp()
- 3.0.x tests/src/Unit/InstallFunctionsTest.php \Drupal\Tests\flysystem\Unit\InstallFunctionsTest::setUp()
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ InstallFunctionsTest.php, line 30
Class
- InstallFunctionsTest
- Tests flysystem.install functions.
Namespace
Drupal\Tests\flysystem\UnitCode
public function setUp() {
parent::setUp();
if (!defined('REQUIREMENT_ERROR')) {
define('REQUIREMENT_ERROR', 2);
}
require_once dirname(dirname(dirname(__DIR__))) . '/flysystem.install';
$this->factory = $this
->prophesize(FlysystemFactory::class);
$container = new ContainerBuilder();
$container
->set('flysystem_factory', $this->factory
->reveal());
$container
->set('string_translation', $this
->getStringTranslationStub());
\Drupal::setContainer($container);
}