3 namespace Friendica\Test\src\Core\Console;
5 use Asika\SimpleConsole\Console;
6 use Friendica\Test\MockedTest;
7 use Friendica\Test\Util\AppMockTrait;
8 use Friendica\Test\Util\Intercept;
9 use Friendica\Test\Util\VFSTrait;
11 abstract class ConsoleTest extends MockedTest
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);
36 * Dumps the execution of an console output to a string and returns it
38 * @param Console $console The current console instance
40 * @return string the output of the execution
42 protected function dumpExecute($console)
46 $returnStr = Intercept::$cache;