Loading core/modules/file/tests/src/Kernel/FileSaveUploadTest.php +9 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,8 @@ class FileSaveUploadTest extends KernelTestBase { * {@inheritdoc} */ protected function setUp(): void { \file_put_contents('test.bbb', 'test'); parent::setUp(); \file_put_contents('test.bbb', 'test'); $request = new Request(); $request->files->set('files', [ 'file' => new UploadedFile( Loading @@ -53,6 +52,14 @@ protected function setUp(): void { $this->container->set('request_stack', $requestStack); } /** * {@inheritdoc} */ protected function tearDown(): void { \unlink('test.bbb'); parent::tearDown(); } /** * Tests file_save_upload() with empty extensions. */ Loading core/tests/Drupal/KernelTests/Core/Database/DriverSpecificKernelTestBase.php +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ protected function setUp(): void { // is not the one the test requires, skip before test database // initialization so to save cycles. $this->root = static::getDrupalRoot(); chdir($this->root); $connectionInfo = $this->getDatabaseConnectionInfo(); $test_class_parts = explode('\\', get_class($this)); $expected_provider = $test_class_parts[2] ?? ''; Loading core/tests/Drupal/KernelTests/KernelTestBase.php +1 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,7 @@ protected function setUp(): void { $this->registerComparator(new MarkupInterfaceComparator()); $this->root = static::getDrupalRoot(); chdir($this->root); $this->initFileCache(); $this->bootEnvironment(); $this->bootKernel(); Loading core/tests/Drupal/Tests/BrowserTestBase.php +1 −0 Original line number Diff line number Diff line Loading @@ -351,6 +351,7 @@ protected function setUp(): void { parent::setUp(); $this->setUpAppRoot(); chdir($this->root); // Allow tests to compare MarkupInterface objects via assertEquals(). $this->registerComparator(new MarkupInterfaceComparator()); Loading core/tests/Drupal/Tests/Core/Command/QuickStartTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ protected function setUp(): void { $php_executable_finder = new PhpExecutableFinder(); $this->php = $php_executable_finder->find(); $this->root = dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__)), 2); chdir($this->root); if (!is_writable("{$this->root}/sites/simpletest")) { $this->markTestSkipped('This test requires a writable sites/simpletest directory'); } Loading Loading
core/modules/file/tests/src/Kernel/FileSaveUploadTest.php +9 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,8 @@ class FileSaveUploadTest extends KernelTestBase { * {@inheritdoc} */ protected function setUp(): void { \file_put_contents('test.bbb', 'test'); parent::setUp(); \file_put_contents('test.bbb', 'test'); $request = new Request(); $request->files->set('files', [ 'file' => new UploadedFile( Loading @@ -53,6 +52,14 @@ protected function setUp(): void { $this->container->set('request_stack', $requestStack); } /** * {@inheritdoc} */ protected function tearDown(): void { \unlink('test.bbb'); parent::tearDown(); } /** * Tests file_save_upload() with empty extensions. */ Loading
core/tests/Drupal/KernelTests/Core/Database/DriverSpecificKernelTestBase.php +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ protected function setUp(): void { // is not the one the test requires, skip before test database // initialization so to save cycles. $this->root = static::getDrupalRoot(); chdir($this->root); $connectionInfo = $this->getDatabaseConnectionInfo(); $test_class_parts = explode('\\', get_class($this)); $expected_provider = $test_class_parts[2] ?? ''; Loading
core/tests/Drupal/KernelTests/KernelTestBase.php +1 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,7 @@ protected function setUp(): void { $this->registerComparator(new MarkupInterfaceComparator()); $this->root = static::getDrupalRoot(); chdir($this->root); $this->initFileCache(); $this->bootEnvironment(); $this->bootKernel(); Loading
core/tests/Drupal/Tests/BrowserTestBase.php +1 −0 Original line number Diff line number Diff line Loading @@ -351,6 +351,7 @@ protected function setUp(): void { parent::setUp(); $this->setUpAppRoot(); chdir($this->root); // Allow tests to compare MarkupInterface objects via assertEquals(). $this->registerComparator(new MarkupInterfaceComparator()); Loading
core/tests/Drupal/Tests/Core/Command/QuickStartTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ protected function setUp(): void { $php_executable_finder = new PhpExecutableFinder(); $this->php = $php_executable_finder->find(); $this->root = dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__)), 2); chdir($this->root); if (!is_writable("{$this->root}/sites/simpletest")) { $this->markTestSkipped('This test requires a writable sites/simpletest directory'); } Loading