mirror of
https://github.com/friendica/friendica
synced 2025-04-28 15:44:24 +02:00
Move Console namespace one level up
This commit is contained in:
parent
2628da422a
commit
d716a3326f
23 changed files with 46 additions and 44 deletions
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Test\src\Core\Console;
|
||||
|
||||
use Asika\SimpleConsole\Console;
|
||||
use Friendica\Test\MockedTest;
|
||||
use Friendica\Test\Util\AppMockTrait;
|
||||
use Friendica\Test\Util\Intercept;
|
||||
use Friendica\Test\Util\VFSTrait;
|
||||
|
||||
abstract class ConsoleTest extends MockedTest
|
||||
{
|
||||
use VFSTrait;
|
||||
use AppMockTrait;
|
||||
|
||||
/**
|
||||
* @var array The default argv for a Console Instance
|
||||
*/
|
||||
protected $consoleArgv = [ 'consoleTest.php' ];
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
Intercept::setUp();
|
||||
|
||||
$this->setUpVfsDir();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dumps the execution of an console output to a string and returns it
|
||||
*
|
||||
* @param Console $console The current console instance
|
||||
*
|
||||
* @return string the output of the execution
|
||||
*/
|
||||
protected function dumpExecute($console)
|
||||
{
|
||||
Intercept::reset();
|
||||
$console->execute();
|
||||
$returnStr = Intercept::$cache;
|
||||
Intercept::reset();
|
||||
|
||||
return $returnStr;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue