mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-12 11:04:33 +02:00
Config Console Tests (#5621)
* Config Console Tests - `MultiUseConsole` is now a testable console - `ConsoleTest` is a abstract TestClass for console tests - `ConfigConsoleTest` tests the config console commands * disable preserve global state because of smarty * fixed requires & basepath für Console Test
This commit is contained in:
parent
1711f4dc56
commit
4eaeea7889
4 changed files with 201 additions and 0 deletions
23
tests/src/Core/Console/MultiUseConsole.php
Normal file
23
tests/src/Core/Console/MultiUseConsole.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Test\src\Core\Console;
|
||||
|
||||
use Friendica\Core\Console;
|
||||
|
||||
/**
|
||||
* Adds two methods to the Friendica\Core\Console so we can reuse it during tests
|
||||
*
|
||||
* @package Friendica\Test\src\Core\Console
|
||||
*/
|
||||
class MultiUseConsole extends Console
|
||||
{
|
||||
public function reset() {
|
||||
$this->args = [];
|
||||
$this->options = [];
|
||||
}
|
||||
|
||||
public function parseTestArgv($argv)
|
||||
{
|
||||
$this->parseArgv($argv);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue