3 namespace Friendica\Test\src\Core\Console;
5 use Asika\SimpleConsole\Console;
6 use Friendica\Test\Util\AppMockTrait;
7 use Friendica\Test\Util\Intercept;
8 use Friendica\Test\Util\VFSTrait;
9 use PHPUnit\Framework\TestCase;
11 abstract class ConsoleTest extends TestCase
17 * @var array The default argv for a Console Instance
19 protected $consoleArgv = [ 'consoleTest.php' ];
21 protected function setUp()
25 if (!getenv('MYSQL_DATABASE')) {
26 $this->markTestSkipped('Please set the MYSQL_* environment variables to your test database credentials.');
32 $this->mockApp($this->root);
35 protected function tearDown()
43 * Dumps the execution of an console output to a string and returns it
45 * @param Console $console The current console instance
47 * @return string the output of the execution
49 protected function dumpExecute($console)
53 $returnStr = Intercept::$cache;