mostly docs

This commit is contained in:
Dennis Eichhorn 2021-08-29 10:50:31 +02:00
parent eac68f4185
commit 420c34aec2
93 changed files with 300 additions and 7 deletions

View File

@ -14,7 +14,6 @@ declare(strict_types=1);
namespace phpOMS\DataStorage\Database;
use Mpdf\Tag\P;
use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
use phpOMS\DataStorage\Database\Exception\InvalidMapperException;
use phpOMS\DataStorage\Database\Query\Builder;
@ -603,9 +602,7 @@ class DataMapperAbstract implements DataMapperInterface
try {
$sth = self::$db->con->prepare($query->toSql());
if ($sth !== false) {
$sth->execute();
}
$sth->execute();
} catch (\Throwable $t) {
\var_dump($t->getMessage());
\var_dump($a = $query->toSql());
@ -2612,8 +2609,6 @@ class DataMapperAbstract implements DataMapperInterface
->orderBy(static::$table . '_d' . $depth . '.' . ($column !== null ? self::getColumnByMember($column) : static::$primaryField), $order)
->limit($limit);
$q = $query->toSql();
return self::getAllByQuery($query, $relations, $depth);
}

View File

@ -37,9 +37,15 @@ Please note if you are only interested in using the framework without the web ap
### Setup
#### End-User
After installing the requirements and configuring the webserver for the correct path navigate to https://your_url.com/Install and follow the installation process. Afterwards you will be redirected to the installed backend.
For more detailed information please checkout the [Installation Guide](https://orange-management.org/dev/guide?page=setup/installation) for developers or the [Installation Guide](https://orange-management.org/info?page=setup/server) for end-users.
For more detailed information please checkout the [Installation Guide](https://orange-management.org/dev/guide?page=setup/installation).
#### Developer
https://github.com/Orange-Management/Developer-Guide/blob/master/setup/installation.md
## Philosophy

View File

@ -38,6 +38,8 @@ abstract class Hostname extends ValidatorAbstract
/**
* {@inheritdoc}
*
* A IPv6 string MUST be in [...] to be sucessfully validated
*/
public static function isValid(mixed $value, array $constraints = null) : bool
{

View File

@ -30,6 +30,9 @@ class AccountManagerTest extends \PHPUnit\Framework\TestCase
protected $account = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->manager = new AccountManager($GLOBALS['httpSession']);

View File

@ -34,6 +34,9 @@ class AccountTest extends \PHPUnit\Framework\TestCase
{
protected $l11nManager = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->l11nManager = new L11nManager('Api');

View File

@ -27,6 +27,9 @@ class AStarNodeTest extends \PHPUnit\Framework\TestCase
{
protected $node;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->node = new AStarNode(1, 2, 3.0, false);

View File

@ -47,6 +47,13 @@ class AStarTest extends \PHPUnit\Framework\TestCase
[0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,],
];
/**
* Render a maze with ASCII symbols
*
* @param array $grid Maze grid
*
* @return void
*/
private function renderMaze(array $grid) : void
{
echo "\n";

View File

@ -27,6 +27,9 @@ class JumpPointNodeTest extends \PHPUnit\Framework\TestCase
{
protected $node;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->node = new JumpPointNode(1, 2, 3.0, false);

View File

@ -47,6 +47,13 @@ class JumpPointSearchTest extends \PHPUnit\Framework\TestCase
[0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,],
];
/**
* Render a maze with ASCII symbols
*
* @param array $grid Maze grid
*
* @return void
*/
private function renderMaze(array $grid) : void
{
echo "\n";

View File

@ -28,6 +28,9 @@ class BitonicSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class BubbleSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class BucketSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class CocktailShakerSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class CombSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class CycleSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class GnomeSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class HeapSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class InsertionSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class IntroSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class MergeSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class OddEvenSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class PancakeSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class QuickSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class SelectionSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class ShellSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class StoogeSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -28,6 +28,9 @@ class TimSortTest extends \PHPUnit\Framework\TestCase
{
protected $list = [];
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->list = [

View File

@ -34,6 +34,9 @@ class ApplicationManagerTest extends \PHPUnit\Framework\TestCase
{
protected ApplicationManager $appManager;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$app = new class() extends ApplicationAbstract {

View File

@ -27,6 +27,9 @@ class AssetManagerTest extends \PHPUnit\Framework\TestCase
{
protected $manager = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->manager = new AssetManager();

View File

@ -23,6 +23,9 @@ class AuthorizationCodeTest extends \PHPUnit\Framework\TestCase
{
private AuthorizationCode $grant;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->grant = new AuthorizationCode();

View File

@ -23,6 +23,9 @@ class ClientCredentialsTest extends \PHPUnit\Framework\TestCase
{
private ClientCredentials $grant;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->grant = new ClientCredentials();

View File

@ -23,6 +23,9 @@ class GrantAbstractTest extends \PHPUnit\Framework\TestCase
{
private GrantAbstract $grant;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->grant = new class() extends GrantAbstract {

View File

@ -25,6 +25,9 @@ class GrantFactoryTest extends \PHPUnit\Framework\TestCase
{
private GrantFactory $factory;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->factory = new GrantFactory();

View File

@ -23,6 +23,9 @@ class PasswordTest extends \PHPUnit\Framework\TestCase
{
private Password $grant;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->grant = new Password();

View File

@ -23,6 +23,9 @@ class RefreshTokenTest extends \PHPUnit\Framework\TestCase
{
private RefreshToken $grant;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->grant = new RefreshToken();

View File

@ -25,6 +25,9 @@ class HttpBasicAuthOptionProviderTest extends \PHPUnit\Framework\TestCase
{
private HttpBasicAuthOptionProvider $provider;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->provider = new HttpBasicAuthOptionProvider();

View File

@ -25,6 +25,9 @@ class PostAuthOptionProviderTest extends \PHPUnit\Framework\TestCase
{
private PostAuthOptionProvider $provider;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->provider = new PostAuthOptionProvider();

View File

@ -28,6 +28,9 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
{
protected FileCache $cache;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (\is_dir(__DIR__ . '/Cache')) {

View File

@ -28,6 +28,9 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase
{
protected MemCached $cache;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (!\extension_loaded('memcached')) {

View File

@ -27,6 +27,9 @@ final class NullCacheTest extends \PHPUnit\Framework\TestCase
{
protected NullCache $cache;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->cache = new NullCache([]);

View File

@ -28,6 +28,9 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
{
protected RedisCache $cache;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (!\extension_loaded('redis')) {

View File

@ -25,6 +25,9 @@ class CookieJarTest extends \PHPUnit\Framework\TestCase
{
protected CookieJar $jar;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->jar = new CookieJar();

View File

@ -30,6 +30,9 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
protected array $modelArray;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->model = new BaseModel();

View File

@ -27,6 +27,9 @@ class DatabasePoolTest extends \PHPUnit\Framework\TestCase
{
protected DatabasePool $dbPool;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->dbPool = new DatabasePool();

View File

@ -27,6 +27,9 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
{
protected $con;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->con = new MysqlConnection($GLOBALS['CONFIG']['db']['core']['masters']['admin']);

View File

@ -26,6 +26,9 @@ class BuilderTest extends \PHPUnit\Framework\TestCase
{
protected MysqlConnection $con;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->con = new MysqlConnection($GLOBALS['CONFIG']['db']['core']['masters']['admin']);

View File

@ -29,6 +29,9 @@ class MysqlGrammarTest extends \PHPUnit\Framework\TestCase
{
protected MysqlConnection $con;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->con = new MysqlConnection($GLOBALS['CONFIG']['db']['core']['masters']['admin']);

View File

@ -26,6 +26,9 @@ class FileSessionHandlerTest extends \PHPUnit\Framework\TestCase
{
protected FileSessionHandler $sh;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (\is_dir(__DIR__ . '/test')) {

View File

@ -25,6 +25,9 @@ class FileSessionTest extends \PHPUnit\Framework\TestCase
{
protected FileSession $session;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->session = new FileSession();

View File

@ -25,6 +25,9 @@ class HttpSessionTest extends \PHPUnit\Framework\TestCase
{
protected HttpSession $session;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->session = new HttpSession(1, '', 1);

View File

@ -34,6 +34,9 @@ class DispatcherTest extends \PHPUnit\Framework\TestCase
{
protected ApplicationAbstract $app;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->app = new class() extends ApplicationAbstract {

View File

@ -27,6 +27,9 @@ class EventManagerTest extends \PHPUnit\Framework\TestCase
{
protected EventManager $event;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->event = new EventManager();

View File

@ -28,6 +28,9 @@ class L11nManagerTest extends \PHPUnit\Framework\TestCase
{
protected L11nManager $l11nManager;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->l11nManager = new L11nManager('Api');

View File

@ -33,6 +33,9 @@ class LocalizationTest extends \PHPUnit\Framework\TestCase
{
protected Localization $localization;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->localization = new Localization();

View File

@ -29,6 +29,9 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase
{
protected FileLogger $log;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (\is_file(__DIR__ . '/' . \date('Y-m-d') . '.log')) {

View File

@ -30,6 +30,9 @@ class MatrixTest extends \PHPUnit\Framework\TestCase
protected $C = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->A = new Matrix(2, 3);

View File

@ -27,6 +27,9 @@ class LevelLevelRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
// y = 3 + 4 * x

View File

@ -25,6 +25,9 @@ class LevelLogRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
// y = 1 + log(x)

View File

@ -25,6 +25,9 @@ class LogLevelRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
// ln(y) = -1 + 2 * x => y = e^(-1 + 2 * x)

View File

@ -25,6 +25,9 @@ class LogLogRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
// ln(y) = 2 + 3 * ln(x) => y = e^(2 + 3 * ln(x))

View File

@ -25,6 +25,9 @@ class PolynomialRegressionTest extends \PHPUnit\Framework\TestCase
{
protected $reg = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
// y = 1.0 + 2.0 * x + 3.0 * x^2

View File

@ -24,6 +24,9 @@ class ConsoleHeaderTest extends \PHPUnit\Framework\TestCase
{
private ConsoleHeader $header;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->header = new ConsoleHeader();

View File

@ -27,6 +27,9 @@ class ConsoleRequestTest extends \PHPUnit\Framework\TestCase
{
private ConsoleRequest $request;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->request = new ConsoleRequest(new Argument('get:some/test/path'), $l11n = new Localization());

View File

@ -27,6 +27,9 @@ class HeaderAbstractTest extends \PHPUnit\Framework\TestCase
{
protected $header = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->header = new class() extends HeaderAbstract

View File

@ -28,6 +28,9 @@ class HttpHeaderTest extends \PHPUnit\Framework\TestCase
{
protected HttpHeader $header;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->header = new HttpHeader();

View File

@ -26,6 +26,9 @@ class ResponseTest extends \PHPUnit\Framework\TestCase
{
protected HttpResponse $response;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->response = new HttpResponse();

View File

@ -28,6 +28,9 @@ class EmailTestTest extends \PHPUnit\Framework\TestCase
{
protected Email $mail;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->mail = new Email();

View File

@ -31,6 +31,9 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase
{
protected MailHandler $handler;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->handler = new MailHandler();

View File

@ -28,6 +28,9 @@ class ResponseAbstractTest extends \PHPUnit\Framework\TestCase
{
protected $response = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->response = new class() extends ResponseAbstract

View File

@ -26,6 +26,9 @@ class HeadTest extends \PHPUnit\Framework\TestCase
{
protected Head $head;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->head = new Head();

View File

@ -25,6 +25,9 @@ class MetaTest extends \PHPUnit\Framework\TestCase
{
protected Meta $meta;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->meta = new Meta();

View File

@ -36,6 +36,9 @@ class ModuleAbstractTest extends \PHPUnit\Framework\TestCase
{
protected $module = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->module = new class() extends ModuleAbstract
@ -214,6 +217,9 @@ class ModuleAbstractTest extends \PHPUnit\Framework\TestCase
);
}
/**
* Create test database schema
*/
private function dbSetup() : void
{
BaseModelMapper::clearCache();
@ -289,6 +295,9 @@ class ModuleAbstractTest extends \PHPUnit\Framework\TestCase
)->execute();
}
/**
* Teardown test database
*/
private function dbTeardown() : void
{
$GLOBALS['dbpool']->get()->con->prepare('DROP TABLE test_conditional')->execute();

View File

@ -35,6 +35,9 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase
protected ModuleManager $moduleManager;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->app = new class() extends ApplicationAbstract {

View File

@ -30,6 +30,9 @@ final class NullModuleTest extends \PHPUnit\Framework\TestCase
{
protected NullModule $module;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$app = new class() extends ApplicationAbstract

View File

@ -30,6 +30,9 @@ class SocketRouterTest extends \PHPUnit\Framework\TestCase
{
protected SocketRouter $router;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->router = new SocketRouter();

View File

@ -34,6 +34,9 @@ class WebRouterTest extends \PHPUnit\Framework\TestCase
{
protected WebRouter $router;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->router = new WebRouter();

View File

@ -45,6 +45,9 @@ class ClientTest extends \PHPUnit\Framework\TestCase
}
}
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (!Autoloader::exists('\Model\CoreSettings')) {

View File

@ -45,6 +45,9 @@ class ServerTest extends \PHPUnit\Framework\TestCase
}
}
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (!Autoloader::exists('\Model\CoreSettings')) {

View File

@ -26,6 +26,9 @@ class AddressTest extends \PHPUnit\Framework\TestCase
{
protected Address $address;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->address = new Address();

View File

@ -26,6 +26,9 @@ class LocationTest extends \PHPUnit\Framework\TestCase
{
protected Location $location;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->location = new Location();

View File

@ -26,6 +26,9 @@ class GraphTest extends \PHPUnit\Framework\TestCase
{
protected Graph $graph;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->graph = new Graph();

View File

@ -33,6 +33,9 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase
self::$con = Directory::ftpConnect(new HttpUri(self::BASE));
}
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (self::$con === false) {

View File

@ -35,6 +35,9 @@ class FileTest extends \PHPUnit\Framework\TestCase
self::$con = File::ftpConnect(new HttpUri(self::BASE));
}
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (self::$con === false) {

View File

@ -36,6 +36,9 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase
self::$con = Directory::ftpConnect(new HttpUri(self::BASE));
}
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (self::$con === false) {

View File

@ -314,6 +314,11 @@ class ArrayUtilsTest extends \PHPUnit\Framework\TestCase
self::assertEquals([1, 3, 4], ArrayUtils::abs([-1, 3, -4]));
}
/**
* @testdox The difference of two arrays can be evaluated recursively
* @covers phpOMS\Utils\ArrayUtils
* @group framework
*/
public function testArrayDiffAssocResursive() : void
{
self::assertEquals(

View File

@ -23,6 +23,9 @@ class C128AbstractTest extends \PHPUnit\Framework\TestCase
{
protected $obj = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->obj = new class() extends C128Abstract {};

View File

@ -30,6 +30,9 @@ class CurrencyTest extends \PHPUnit\Framework\TestCase
{
private static $reachable;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (!isset(self::$reachable)) {

View File

@ -36,6 +36,11 @@ class CsvSettingsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(';', CsvSettings::getFileDelimiter(\fopen(__DIR__ . '/semicolon.csv', 'r')));
}
/**
* @testdox The delimiter in a csv string can be guessed
* @covers phpOMS\Utils\IO\Csv\CsvSettings
* @group framework
*/
public function testStringDelimiter() : void
{
self::assertEquals(':', CsvSettings::getStringDelimiter(\file_get_contents(__DIR__ . '/colon.csv')));

View File

@ -35,6 +35,9 @@ class SpreadsheetDatabaseMapperTest extends \PHPUnit\Framework\TestCase
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
}
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
if (!\extension_loaded('pdo_sqlite')) {

View File

@ -27,6 +27,9 @@ class StringCompareTest extends \PHPUnit\Framework\TestCase
{
private StringCompare $dict;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->dict = new StringCompare(

View File

@ -26,6 +26,9 @@ class TaskAbstractTest extends \PHPUnit\Framework\TestCase
{
private $class = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->class = new class('') extends TaskAbstract {

View File

@ -36,6 +36,11 @@ class HostnameTest extends \PHPUnit\Framework\TestCase
self::assertFalse(Hostname::isValid('//somethign/wrong'));
}
/**
* @testdox A IP can be validated as hostname
* @covers phpOMS\Validation\Network\Hostname
* @group framework
*/
public function testHostnameIp() : void
{
self::assertTrue(Hostname::isValid('127.0.0.1'));

View File

@ -37,6 +37,9 @@ class ViewTest extends \PHPUnit\Framework\TestCase
protected ApplicationAbstract $app;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->dbPool = new DatabasePool();