Skip to content
Snippets Groups Projects
Verified Commit cdce4ebf authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3422485 by mondrake, smustgrave: Change...

Issue #3422485 by mondrake, smustgrave: Change DrupalLogErrorTest::provideFatalExitCodeData to static

(cherry picked from commit 5eca8bf8)
parent 4a7f771f
No related branches found
No related tags found
8 merge requests!8376Drupal views: adding more granularity to the ‘use ajax’ functionality,!8300Issue #3443586 View area displays even when parent view has no results.,!7567Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7565Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7509Change label "Block description" to "Block type",!7344Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update...,!6922Issue #3412959 by quietone, smustgrave, longwave: Fix 12 'un' words,!6848Issue #3417553 by longwave: Remove withConsecutive() in CacheCollectorTest
Pipeline #106468 passed with warnings
Pipeline: drupal

#106487

    Pipeline: drupal

    #106480

      Pipeline: drupal

      #106477

        +1
        ......@@ -19,7 +19,7 @@ class DrupalLogErrorTest extends UnitTestCase {
        *
        * @dataProvider provideFatalExitCodeData
        */
        public function testFatalExitCode(string $script, string $output, string $errorOutput, bool $processIsSuccessful) {
        public function testFatalExitCode(string $script, string $output, string $errorOutput, bool $processIsSuccessful): void {
        // We need to override the current working directory for invocations from
        // run-tests.sh to work properly.
        $process = new PhpProcess($script, $this->root);
        ......@@ -32,9 +32,9 @@ public function testFatalExitCode(string $script, string $output, string $errorO
        $this->assertSame($processIsSuccessful, $process->isSuccessful());
        }
        public function provideFatalExitCodeData() {
        public function provideFatalExitCodeData(): array {
        $verbose = "\$GLOBALS['config']['system.logging']['error_level'] = 'verbose';";
        $scriptBody = $this->getScriptBody();
        $scriptBody = self::getScriptBody();
        $data['normal'] = [
        "<?php\n\$fatal = TRUE;\n$scriptBody",
        "kernel test: This is a test message in test_function (line 456 of test.module).\n",
        ......@@ -50,7 +50,7 @@ public function provideFatalExitCodeData() {
        return $data;
        }
        protected function getScriptBody() {
        protected static function getScriptBody(): string {
        return <<<'EOT'
        if (PHP_SAPI !== 'cli') {
        return;
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment