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
18 protected function setUp()
22 if (!getenv('MYSQL_DATABASE')) {
23 $this->markTestSkipped('Please set the MYSQL_* environment variables to your test database credentials.');
29 $this->mockApp($this->root);
32 protected function tearDown()
40 * Dumps the execution of an console output to a string and returns it
42 * @param Console $console The current console instance
44 * @return string the output of the execution
46 protected function dumpExecute($console)
50 $returnStr = Intercept::$cache;