fix @covers

This commit is contained in:
Dennis Eichhorn 2020-10-09 00:20:25 +02:00
parent 7587f496d3
commit 27f7f9a1dd
39 changed files with 124 additions and 2 deletions

View File

@ -210,7 +210,7 @@ abstract class InstallerAbstract
self::installRoutes(__DIR__ . '/../../' . $child->getName() . '/' . \basename($file->getName(), '.php') . '/Routes.php', $file->getPath()); self::installRoutes(__DIR__ . '/../../' . $child->getName() . '/' . \basename($file->getName(), '.php') . '/Routes.php', $file->getPath());
} }
} elseif ($child instanceof File) { } elseif ($child instanceof File) {
if (!\is_file(__DIR__ . '/../../' . $child->getName()) if (!\is_dir(__DIR__ . '/../../' . $child->getName())
|| ($appInfo !== null && \basename($child->getName(), '.php') !== $appInfo->getInternalName()) || ($appInfo !== null && \basename($child->getName(), '.php') !== $appInfo->getInternalName())
) { ) {
continue; continue;
@ -289,7 +289,7 @@ abstract class InstallerAbstract
self::installHooks(__DIR__ . '/../../' . $child->getName() . '/' . \basename($file->getName(), '.php') . '/Hooks.php', $file->getPath()); self::installHooks(__DIR__ . '/../../' . $child->getName() . '/' . \basename($file->getName(), '.php') . '/Hooks.php', $file->getPath());
} }
} elseif ($child instanceof File) { } elseif ($child instanceof File) {
if (!\is_file(__DIR__ . '/../../' . $child->getName()) if (!\is_dir(__DIR__ . '/../../' . $child->getName())
|| ($appInfo !== null && \basename($child->getName(), '.php') !== $appInfo->getInternalName()) || ($appInfo !== null && \basename($child->getName(), '.php') !== $appInfo->getInternalName())
) { ) {
continue; continue;

View File

@ -21,6 +21,10 @@ use phpOMS\AutoloadException;
*/ */
class AutoloadExceptionTest extends \PHPUnit\Framework\TestCase class AutoloadExceptionTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\AutoloadException
* @group framework
*/
public function testException() : void public function testException() : void
{ {
self::assertInstanceOf(\RuntimeException::class, new AutoloadException('')); self::assertInstanceOf(\RuntimeException::class, new AutoloadException(''));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException;
*/ */
class InvalidConnectionConfigExceptionTest extends \PHPUnit\Framework\TestCase class InvalidConnectionConfigExceptionTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException
* @group framework
*/
public function testException() : void public function testException() : void
{ {
self::assertInstanceOf(\InvalidArgumentException::class, new InvalidConnectionConfigException('')); self::assertInstanceOf(\InvalidArgumentException::class, new InvalidConnectionConfigException(''));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException;
*/ */
class InvalidConnectionConfigExceptionTest extends \PHPUnit\Framework\TestCase class InvalidConnectionConfigExceptionTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Exception\InvalidConnectionConfigException
* @group framework
*/
public function testException() : void public function testException() : void
{ {
self::assertInstanceOf(\InvalidArgumentException::class, new InvalidConnectionConfigException('')); self::assertInstanceOf(\InvalidArgumentException::class, new InvalidConnectionConfigException(''));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Exception\InvalidDatabaseTypeException;
*/ */
class InvalidDatabaseTypeExceptionTest extends \PHPUnit\Framework\TestCase class InvalidDatabaseTypeExceptionTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Exception\InvalidDatabaseTypeException
* @group framework
*/
public function testException() : void public function testException() : void
{ {
self::assertInstanceOf(\InvalidArgumentException::class, new InvalidDatabaseTypeException('')); self::assertInstanceOf(\InvalidArgumentException::class, new InvalidDatabaseTypeException(''));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Exception\InvalidMapperException;
*/ */
class InvalidMapperExceptionTest extends \PHPUnit\Framework\TestCase class InvalidMapperExceptionTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Exception\InvalidMapperException
* @group framework
*/
public function testException() : void public function testException() : void
{ {
self::assertInstanceOf(\RuntimeException::class, new InvalidMapperException('')); self::assertInstanceOf(\RuntimeException::class, new InvalidMapperException(''));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Query\Column;
*/ */
class ColumnTest extends \PHPUnit\Framework\TestCase class ColumnTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Query\Column
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Column($GLOBALS['dbpool']->get())); self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Column($GLOBALS['dbpool']->get()));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Query\Count;
*/ */
class CountTest extends \PHPUnit\Framework\TestCase class CountTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Query\Count
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Count($GLOBALS['dbpool']->get())); self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Count($GLOBALS['dbpool']->get()));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Query\Expression;
*/ */
class ExpressionTest extends \PHPUnit\Framework\TestCase class ExpressionTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Query\Expression
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Expression($GLOBALS['dbpool']->get())); self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Expression($GLOBALS['dbpool']->get()));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Query\From;
*/ */
class FromTest extends \PHPUnit\Framework\TestCase class FromTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Query\From
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new From($GLOBALS['dbpool']->get())); self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new From($GLOBALS['dbpool']->get()));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Query\Grammar\MicrosoftGrammar;
*/ */
class MicrosoftGrammarTest extends \PHPUnit\Framework\TestCase class MicrosoftGrammarTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Query\Grammar\MicrosoftGrammar
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\Grammar', new MicrosoftGrammar()); self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\Grammar', new MicrosoftGrammar());

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Query\Grammar\OracleGrammar;
*/ */
class OracleGrammarTest extends \PHPUnit\Framework\TestCase class OracleGrammarTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Query\Grammar\OracleGrammar
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\Grammar', new OracleGrammar()); self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\Grammar', new OracleGrammar());

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Query\Grammar\PostgresGrammar;
*/ */
class PostgresGrammarTest extends \PHPUnit\Framework\TestCase class PostgresGrammarTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Query\Grammar\PostgresGrammar
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\Grammar', new PostgresGrammar()); self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Grammar\Grammar', new PostgresGrammar());

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Query\Into;
*/ */
class IntoTest extends \PHPUnit\Framework\TestCase class IntoTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Query\Into
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Into($GLOBALS['dbpool']->get())); self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Into($GLOBALS['dbpool']->get()));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Query\Select;
*/ */
class SelectTest extends \PHPUnit\Framework\TestCase class SelectTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Query\Select
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Select($GLOBALS['dbpool']->get())); self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Select($GLOBALS['dbpool']->get()));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Query\Where;
*/ */
class WhereTest extends \PHPUnit\Framework\TestCase class WhereTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Query\Where
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Where($GLOBALS['dbpool']->get())); self::assertInstanceOf('\phpOMS\DataStorage\Database\Query\Builder', new Where($GLOBALS['dbpool']->get()));

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\OracleGrammar;
*/ */
class OracleGrammarTest extends \PHPUnit\Framework\TestCase class OracleGrammarTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Schema\Grammar\OracleGrammar
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Schema\Grammar\Grammar', new OracleGrammar()); self::assertInstanceOf('\phpOMS\DataStorage\Database\Schema\Grammar\Grammar', new OracleGrammar());

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\PostgresGrammar;
*/ */
class PostgresGrammarTest extends \PHPUnit\Framework\TestCase class PostgresGrammarTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Schema\Grammar\PostgresGrammar
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Schema\Grammar\Grammar', new PostgresGrammar()); self::assertInstanceOf('\phpOMS\DataStorage\Database\Schema\Grammar\Grammar', new PostgresGrammar());

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\SqlServerGrammar;
*/ */
class SqlServerGrammarTest extends \PHPUnit\Framework\TestCase class SqlServerGrammarTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\Database\Schema\Grammar\SqlServerGrammar
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::assertInstanceOf('\phpOMS\DataStorage\Database\Schema\Grammar\Grammar', new SqlServerGrammar()); self::assertInstanceOf('\phpOMS\DataStorage\Database\Schema\Grammar\Grammar', new SqlServerGrammar());

View File

@ -23,6 +23,10 @@ use phpOMS\DataStorage\LockException;
*/ */
class LockExceptionTest extends \PHPUnit\Framework\TestCase class LockExceptionTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\DataStorage\LockException
* @group framework
*/
public function testException() : void public function testException() : void
{ {
self::assertInstanceOf(\RuntimeException::class, new LockException('')); self::assertInstanceOf(\RuntimeException::class, new LockException(''));

View File

@ -40,6 +40,7 @@ class CityMapperTest extends \PHPUnit\Framework\TestCase
/** /**
* @testdox The model can be read from the database * @testdox The model can be read from the database
* @covers phpOMS\Localization\Defaults\CityMapper
* @group framework * @group framework
*/ */
public function testR() : void public function testR() : void

View File

@ -27,6 +27,7 @@ class CityTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* @testdox The model has the expected member variables and default values * @testdox The model has the expected member variables and default values
* @covers phpOMS\Localization\Defaults\City
* @group framework * @group framework
*/ */
public function testDefaults() : void public function testDefaults() : void

View File

@ -40,6 +40,7 @@ class CountryMapperTest extends \PHPUnit\Framework\TestCase
/** /**
* @testdox The model can be read from the database * @testdox The model can be read from the database
* @covers phpOMS\Localization\Defaults\CountryMapper
* @group framework * @group framework
*/ */
public function testR() : void public function testR() : void

View File

@ -27,6 +27,7 @@ class CountryTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* @testdox The model has the expected member variables and default values * @testdox The model has the expected member variables and default values
* @covers phpOMS\Localization\Defaults\Country
* @group framework * @group framework
*/ */
public function testDefaults() : void public function testDefaults() : void

View File

@ -40,6 +40,7 @@ class CurrencyMapperTest extends \PHPUnit\Framework\TestCase
/** /**
* @testdox The model can be read from the database * @testdox The model can be read from the database
* @covers phpOMS\Localization\Defaults\CurrencyMapper
* @group framework * @group framework
*/ */
public function testR() : void public function testR() : void

View File

@ -27,6 +27,7 @@ class CurrencyTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* @testdox The model has the expected member variables and default values * @testdox The model has the expected member variables and default values
* @covers phpOMS\Localization\Defaults\Currency
* @group framework * @group framework
*/ */
public function testDefaults() : void public function testDefaults() : void

View File

@ -40,6 +40,7 @@ class IbanMapperTest extends \PHPUnit\Framework\TestCase
/** /**
* @testdox The model can be read from the database * @testdox The model can be read from the database
* @covers phpOMS\Localization\Defaults\IbanMapper
* @group framework * @group framework
*/ */
public function testR() : void public function testR() : void

View File

@ -27,6 +27,7 @@ class IbanTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* @testdox The model has the expected member variables and default values * @testdox The model has the expected member variables and default values
* @covers phpOMS\Localization\Defaults\Iban
* @group framework * @group framework
*/ */
public function testDefaults() : void public function testDefaults() : void

View File

@ -40,6 +40,7 @@ class LanguageMapperTest extends \PHPUnit\Framework\TestCase
/** /**
* @testdox The model can be read from the database * @testdox The model can be read from the database
* @covers phpOMS\Localization\Defaults\LanguageMapper
* @group framework * @group framework
*/ */
public function testR() : void public function testR() : void

View File

@ -27,6 +27,7 @@ class LanguageTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* @testdox The model has the expected member variables and default values * @testdox The model has the expected member variables and default values
* @covers phpOMS\Localization\Defaults\Language
* @group framework * @group framework
*/ */
public function testDefaults() : void public function testDefaults() : void

View File

@ -21,6 +21,10 @@ use phpOMS\Math\Exception\ZeroDivisionException;
*/ */
class ZeroDivisionExceptionTest extends \PHPUnit\Framework\TestCase class ZeroDivisionExceptionTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\Math\Exception\ZeroDivisionException
* @group framework
*/
public function testException() : void public function testException() : void
{ {
self::assertInstanceOf(\UnexpectedValueException::class, new ZeroDivisionException()); self::assertInstanceOf(\UnexpectedValueException::class, new ZeroDivisionException());

View File

@ -21,6 +21,10 @@ use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
*/ */
class InvalidDimensionExceptionTest extends \PHPUnit\Framework\TestCase class InvalidDimensionExceptionTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\Math\Matrix\Exception\InvalidDimensionException
* @group framework
*/
public function testException() : void public function testException() : void
{ {
self::assertInstanceOf(\UnexpectedValueException::class, new InvalidDimensionException('')); self::assertInstanceOf(\UnexpectedValueException::class, new InvalidDimensionException(''));

View File

@ -21,6 +21,10 @@ use phpOMS\Math\Statistic\Basic;
*/ */
class BasicTest extends \PHPUnit\Framework\TestCase class BasicTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\Math\Statistic\Basic
* @group framework
*/
public function testFrequency() : void public function testFrequency() : void
{ {
self::assertEquals( self::assertEquals(

View File

@ -21,6 +21,10 @@ use phpOMS\Message\Mail\Imap;
*/ */
class ImapTest extends \PHPUnit\Framework\TestCase class ImapTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\Message\Mail\Imap
* @group framework
*/
public function testDefault() : void public function testDefault() : void
{ {
self::markTestIncomplete(); self::markTestIncomplete();

View File

@ -21,6 +21,10 @@ use phpOMS\Module\Exception\InvalidModuleException;
*/ */
class InvalidModuleExceptionTest extends \PHPUnit\Framework\TestCase class InvalidModuleExceptionTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\Module\Exception\InvalidModuleException
* @group framework
*/
public function testException() : void public function testException() : void
{ {
self::assertInstanceOf(\UnexpectedValueException::class, new InvalidModuleException('')); self::assertInstanceOf(\UnexpectedValueException::class, new InvalidModuleException(''));

View File

@ -23,6 +23,10 @@ use phpOMS\Preloader;
*/ */
class PreloaderTest extends \PHPUnit\Framework\TestCase class PreloaderTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\Preloader
* @group framework
*/
public function testPreloading() : void public function testPreloading() : void
{ {
$includes = \get_included_files(); $includes = \get_included_files();

View File

@ -21,6 +21,10 @@ use phpOMS\Stdlib\Base\NullLocation;
*/ */
final class NullLocationTest extends \PHPUnit\Framework\TestCase final class NullLocationTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\Stdlib\Base\NullLocation
* @group framework
*/
public function testNullLocation() : void public function testNullLocation() : void
{ {
self::assertInstanceOf('\phpOMS\Stdlib\Base\Location', new NullLocation()); self::assertInstanceOf('\phpOMS\Stdlib\Base\Location', new NullLocation());

View File

@ -21,6 +21,10 @@ use phpOMS\System\File\PathException;
*/ */
class PathExceptionTest extends \PHPUnit\Framework\TestCase class PathExceptionTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\System\File\PathException
* @group framework
*/
public function testConstructor() : void public function testConstructor() : void
{ {
$e = new PathException('test.file'); $e = new PathException('test.file');

View File

@ -22,6 +22,10 @@ use phpOMS\Utils\Parser\Markdown\Markdown;
*/ */
class MarkdownTest extends \PHPUnit\Framework\TestCase class MarkdownTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers phpOMS\Utils\Parser\Markdown\Markdown
* @group framework
*/
public function testParsing() : void public function testParsing() : void
{ {
$files = Directory::list(__DIR__ . '/data'); $files = Directory::list(__DIR__ . '/data');