PHP 8.3.31
Preview: InteractsWithConsole.php Size: 2.08 KB
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php

<?php

namespace Illuminate\Foundation\Testing\Concerns;

use Illuminate\Console\OutputStyle;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Testing\PendingCommand;

trait InteractsWithConsole
{
    /**
     * Indicates if the console output should be mocked.
     *
     * @var bool
     */
    public $mockConsoleOutput = true;

    /**
     * Indicates if the command is expected to output anything.
     *
     * @var bool|null
     */
    public $expectsOutput;

    /**
     * All of the expected output lines.
     *
     * @var array
     */
    public $expectedOutput = [];

    /**
     * All of the expected text to be present in the output.
     *
     * @var array
     */
    public $expectedOutputSubstrings = [];

    /**
     * All of the output lines that aren't expected to be displayed.
     *
     * @var array
     */
    public $unexpectedOutput = [];

    /**
     * All of the text that is not expected to be present in the output.
     *
     * @var array
     */
    public $unexpectedOutputSubstrings = [];

    /**
     * All of the expected output tables.
     *
     * @var array
     */
    public $expectedTables = [];

    /**
     * All of the expected questions.
     *
     * @var array
     */
    public $expectedQuestions = [];

    /**
     * All of the expected choice questions.
     *
     * @var array
     */
    public $expectedChoices = [];

    /**
     * Call artisan command and return code.
     *
     * @param  string  $command
     * @param  array  $parameters
     * @return \Illuminate\Testing\PendingCommand|int
     */
    public function artisan($command, $parameters = [])
    {
        if (! $this->mockConsoleOutput) {
            return $this->app[Kernel::class]->call($command, $parameters);
        }

        return new PendingCommand($this, $this->app, $command, $parameters);
    }

    /**
     * Disable mocking the console output.
     *
     * @return $this
     */
    protected function withoutMockingConsoleOutput()
    {
        $this->mockConsoleOutput = false;

        $this->app->offsetUnset(OutputStyle::class);

        return $this;
    }
}

Directory Contents

Dirs: 0 × Files: 13

Name Size Perms Modified Actions
3.92 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
2.08 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
6.48 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
9.82 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
1.16 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
6.65 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
3.01 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
1.12 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
7.94 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
1.49 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
2.34 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
20.02 KB lrw-rw-rw- 2025-09-17 06:52:55
Edit Download
111 B lrw-rw-rw- 2025-09-17 06:52:55
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).