Automated formatting changes

This commit is contained in:
Formatter Bot 2021-10-10 09:08:16 +00:00
parent fa7fb0f188
commit a42f662062
16 changed files with 219 additions and 229 deletions

View File

@ -14,11 +14,11 @@ declare(strict_types=1);
namespace phpOMS\Application;
use phpOMS\Autoloader;
use phpOMS\Config\SettingsInterface;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\DataStorage\Database\Schema\Builder as SchemaBuilder;
use phpOMS\System\File\Local\Directory;
use phpOMS\Autoloader;
/**
* Installer abstract class.

View File

@ -15,10 +15,10 @@ declare(strict_types=1);
namespace phpOMS\Module;
use phpOMS\Application\ApplicationInfo;
use phpOMS\Autoloader;
use phpOMS\Config\SettingsInterface;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\DataStorage\Database\Schema\Builder as SchemaBuilder;
use phpOMS\Autoloader;
/**
* Installer abstract class.

View File

@ -247,11 +247,11 @@ abstract class ModuleAbstract
/**
* Create a model
*
* @param int $account Account id
* @param mixed $obj Response object
* @param int $account Account id
* @param mixed $obj Response object
* @param string | \Closure $mapper Object mapper
* @param string $trigger Trigger for the event manager
* @param string $ip Ip
* @param string $trigger Trigger for the event manager
* @param string $ip Ip
*
* @return void
*
@ -286,11 +286,11 @@ abstract class ModuleAbstract
/**
* Create a model
*
* @param int $account Account id
* @param array $objs Response object
* @param int $account Account id
* @param array $objs Response object
* @param string | \Closure $mapper Object mapper
* @param string $trigger Trigger for the event manager
* @param string $ip Ip
* @param string $trigger Trigger for the event manager
* @param string $ip Ip
*
* @return void
*
@ -327,12 +327,12 @@ abstract class ModuleAbstract
/**
* Update a model
*
* @param int $account Account id
* @param mixed $old Response object old
* @param mixed $new Response object new
* @param int $account Account id
* @param mixed $old Response object old
* @param mixed $new Response object new
* @param string | \Closure $mapper Object mapper
* @param string $trigger Trigger for the event manager
* @param string $ip Ip
* @param string $trigger Trigger for the event manager
* @param string $ip Ip
*
* @return void
*
@ -365,11 +365,11 @@ abstract class ModuleAbstract
/**
* Delete a model
*
* @param int $account Account id
* @param mixed $obj Response object
* @param int $account Account id
* @param mixed $obj Response object
* @param string | \Closure $mapper Object mapper
* @param string $trigger Trigger for the event manager
* @param string $ip Ip
* @param string $trigger Trigger for the event manager
* @param string $ip Ip
*
* @return void
*

View File

@ -730,7 +730,7 @@ class Graph
$paths = $this->getAllPathsBetweenNodes($node1, $node2);
$edges = [];
$edges = [];
$leastNodes = 0;
$leastNodesCount = \PHP_INT_MAX;
foreach ($paths as $key => $path) {

View File

@ -16,10 +16,9 @@ namespace phpOMS\tests\Application;
require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Application\ApplicationInfo;
use phpOMS\Application\UninstallerAbstract;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Application\ApplicationInfo;
use Model\CoreSettings;
/**
* @testdox phpOMS\tests\Application\UninstallerAbstractTest: Abstract module
@ -30,12 +29,11 @@ class UninstallerAbstractTest extends \PHPUnit\Framework\TestCase
{
protected UninstallerAbstract $uninstaller;
/**
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->uninstaller = new class() extends UninstallerAbstract
{
public const PATH = __DIR__ . '/invalid';

View File

@ -23,226 +23,226 @@ $CONFIG = [
'core' => [
'masters' => [
'admin' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'insert' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'select' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'update' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'delete' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'schema' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
'login' => 'root', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
],
'postgresql' => [
'admin' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'insert' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'select' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'update' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'delete' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'schema' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
'login' => 'postgres', /* db login name */
'password' => 'root', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
],
'sqlite' => [
'admin' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'insert' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'select' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'update' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'delete' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'schema' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/test.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
],
'mssql' => [
'admin' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'insert' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'select' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'update' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'delete' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'schema' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s'
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'R00troot', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
],
],

View File

@ -14,13 +14,13 @@ declare(strict_types=1);
namespace phpOMS\tests\DataStorage\Database;
use phpOMS\tests\DataStorage\Database\TestModel\BaseModel;
use phpOMS\tests\DataStorage\Database\TestModel\NullBaseModel;
use phpOMS\tests\DataStorage\Database\TestModel\BaseModelMapper;
use phpOMS\tests\DataStorage\Database\TestModel\Conditional;
use phpOMS\tests\DataStorage\Database\TestModel\ConditionalMapper;
use phpOMS\tests\DataStorage\Database\TestModel\ManyToManyDirectModelMapper;
use phpOMS\tests\DataStorage\Database\TestModel\ManyToManyRelModel;
use phpOMS\tests\DataStorage\Database\TestModel\ManyToManyRelModelMapper;
use phpOMS\tests\DataStorage\Database\TestModel\NullBaseModel;
/**
* @testdox phpOMS\tests\DataStorage\Database\DataMapperAbstractTest: Datamapper for database models
@ -197,7 +197,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
public function testCreateNullModel() : void
{
$nullModel1 = new NullBaseModel();
self::assertEquals(null, BaseModelMapper::create($nullModel1));
self::assertNull(BaseModelMapper::create($nullModel1));
$nullModel2 = new NullBaseModel(77);
self::assertEquals(77, BaseModelMapper::create($nullModel2));
@ -229,7 +229,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
$count1 = \count($this->model->hasManyRelations);
$hasMany = new ManyToManyRelModel();
$id2 = ManyToManyRelModelMapper::create($hasMany);
$id2 = ManyToManyRelModelMapper::create($hasMany);
BaseModelMapper::createRelation('hasManyRelations', $id1, $id2);
@ -292,10 +292,10 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
public function testGetBy() : void
{
$model1 = new BaseModel();
$model1 = new BaseModel();
$model1->string = '123';
$model2 = new BaseModel();
$model2 = new BaseModel();
$model2->string = '456';
$id1 = BaseModelMapper::create($model1);
@ -316,13 +316,13 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
public function testGetNewest() : void
{
$model1 = new BaseModel();
$model1 = new BaseModel();
$model1->datetime = new \DateTime('now');
$id1 = BaseModelMapper::create($model1);
$id1 = BaseModelMapper::create($model1);
\sleep(1);
$model2 = new BaseModel();
$model2 = new BaseModel();
$model2->datetime = new \DateTime('now');
$id2 = BaseModelMapper::create($model2);
$id2 = BaseModelMapper::create($model2);
$newest = BaseModelMapper::getNewest();
self::assertEquals($id2, \reset($newest)->getId());

View File

@ -51,8 +51,8 @@ class MysqlGrammarTest extends \PHPUnit\Framework\TestCase
/**
* @testdox The the grammar correctly creates and returns a database table
* @covers phpOMS\DataStorage\Database\Schema\Grammar\MysqlGrammar<extended>
* @covers phpOMS\DataStorage\Database\Schema\Builder
* @covers phpOMS\DataStorage\Database\Schema\Grammar\MysqlGrammar<extended>
* @group framework
*/
public function testSchemaInputOutput() : void

View File

@ -77,12 +77,11 @@ class EmailTestTest extends \PHPUnit\Framework\TestCase
self::assertEquals(
[
'test@orange-management.org' => ['test@orange-management.org', 'Test Name'],
'test@orange-management.org' => ['test@orange-management.org', 'Test Name'],
'test2@orange-management.org' => ['test2@orange-management.org', 'Test Name 2'],
],
$this->mail->to
);
}
public function testInvalidAddTo() : void
@ -98,12 +97,11 @@ class EmailTestTest extends \PHPUnit\Framework\TestCase
self::assertEquals(
[
'test@orange-management.org' => ['test@orange-management.org', 'Test Name'],
'test@orange-management.org' => ['test@orange-management.org', 'Test Name'],
'test2@orange-management.org' => ['test2@orange-management.org', 'Test Name 2'],
],
$this->mail->cc
);
}
public function testInvalidAddCC() : void
@ -119,12 +117,11 @@ class EmailTestTest extends \PHPUnit\Framework\TestCase
self::assertEquals(
[
'test@orange-management.org' => ['test@orange-management.org', 'Test Name'],
'test@orange-management.org' => ['test@orange-management.org', 'Test Name'],
'test2@orange-management.org' => ['test2@orange-management.org', 'Test Name 2'],
],
$this->mail->bcc
);
}
public function testInvalidAddBCC() : void
@ -140,12 +137,11 @@ class EmailTestTest extends \PHPUnit\Framework\TestCase
self::assertEquals(
[
'test@orange-management.org' => ['test@orange-management.org', 'Test Name'],
'test@orange-management.org' => ['test@orange-management.org', 'Test Name'],
'test2@orange-management.org' => ['test2@orange-management.org', 'Test Name 2'],
],
$this->mail->replyTo
);
}
public function testInvalidAddReplyTo() : void

View File

@ -343,7 +343,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase
$mail->setFrom('test1@orange-management.email', 'Dennis Eichhorn');
$mail->addTo('test@orange-management.email', 'Dennis Eichhorn');
$mail->subject = 'testSendPlainWithMail';
$mail->body = 'Body';
$mail->body = 'Body';
self::assertTrue($this->handler->send($mail));
}
@ -360,7 +360,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase
$mail->setFrom('test1@orange-management.email', 'Dennis Eichhorn');
$mail->addTo('test@orange-management.email', 'Dennis Eichhorn');
$mail->subject = 'testSendPlainWithSendmail';
$mail->body = 'Body';
$mail->body = 'Body';
self::assertTrue($this->handler->send($mail));
}

View File

@ -16,10 +16,10 @@ namespace phpOMS\tests\Module;
require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Module\InstallerAbstract;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Module\ModuleInfo;
use Model\CoreSettings;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Module\InstallerAbstract;
use phpOMS\Module\ModuleInfo;
/**
* @testdox phpOMS\tests\Module\InstallerAbstractTest: Abstract module
@ -30,14 +30,13 @@ class InstallerAbstractTest extends \PHPUnit\Framework\TestCase
{
protected InstallerAbstract $installer;
/**
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->installer = new class() extends InstallerAbstract
{
};
}

View File

@ -138,28 +138,28 @@ class ModuleAbstractTest extends \PHPUnit\Framework\TestCase
public function createWithCallable() : string
{
\ob_start();
$this->createModel(1, null, function() { echo 1; }, '', '127.0.0.1');
$this->createModel(1, null, function() : void { echo 1; }, '', '127.0.0.1');
return \ob_get_clean();
}
public function createsWithCallable() : string
{
\ob_start();
$this->createModels(1, [null, null], function() { echo 1; }, '', '127.0.0.1');
$this->createModels(1, [null, null], function() : void { echo 1; }, '', '127.0.0.1');
return \ob_get_clean();
}
public function updateWithCallable() : string
{
\ob_start();
$this->updateModel(1, null, null, function() { echo 1; }, '', '127.0.0.1');
$this->updateModel(1, null, null, function() : void { echo 1; }, '', '127.0.0.1');
return \ob_get_clean();
}
public function deleteWithCallable() : string
{
\ob_start();
$this->deleteModel(1, null, function() { echo 1; }, '', '127.0.0.1');
$this->deleteModel(1, null, function() : void { echo 1; }, '', '127.0.0.1');
return \ob_get_clean();
}
};

View File

@ -27,14 +27,13 @@ class StatusAbstractTest extends \PHPUnit\Framework\TestCase
{
protected StatusAbstract $status;
/**
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->status = new class() extends StatusAbstract
{
};
}
}

View File

@ -16,10 +16,9 @@ namespace phpOMS\tests\Module;
require_once __DIR__ . '/../Autoloader.php';
use phpOMS\Module\UninstallerAbstract;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Module\ModuleInfo;
use Model\CoreSettings;
use phpOMS\Module\UninstallerAbstract;
/**
* @testdox phpOMS\tests\Module\UninstallerAbstractTest: Abstract module
@ -30,12 +29,11 @@ class UninstallerAbstractTest extends \PHPUnit\Framework\TestCase
{
protected UninstallerAbstract $uninstaller;
/**
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->uninstaller = new class() extends UninstallerAbstract
{
public const PATH = __DIR__ . '/invalid';

View File

@ -397,7 +397,7 @@ class GraphTest extends \PHPUnit\Framework\TestCase
self::assertEquals(17.0, $minimalSpanningTree->getCost());
}
/**
/**
* 1 - 3 - 5
* / |\ /
* 0 | \ /

View File

@ -174,6 +174,6 @@ class NodeTest extends \PHPUnit\Framework\TestCase
$node1->setNodeRelative($node3);
self::assertEquals('C', $node1->getEdgeByNeighbor($node3)->getNode2()->getId());
self::assertEquals(null, $node1->getEdgeByNeighbor($node4));
self::assertNull($node1->getEdgeByNeighbor($node4));
}
}