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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -21,6 +21,10 @@ use phpOMS\DataStorage\Database\Query\Column;
*/
class ColumnTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers phpOMS\DataStorage\Database\Query\Column
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Query\Count
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Query\Expression
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Query\From
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Query\Grammar\MicrosoftGrammar
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Query\Grammar\OracleGrammar
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Query\Grammar\PostgresGrammar
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Query\Into
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Query\Select
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Query\Where
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Schema\Grammar\OracleGrammar
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Schema\Grammar\PostgresGrammar
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\Database\Schema\Grammar\SqlServerGrammar
* @group framework
*/
public function testDefault() : void
{
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
{
/**
* @covers phpOMS\DataStorage\LockException
* @group framework
*/
public function testException() : void
{
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
* @covers phpOMS\Localization\Defaults\CityMapper
* @group framework
*/
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
* @covers phpOMS\Localization\Defaults\City
* @group framework
*/
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
* @covers phpOMS\Localization\Defaults\CountryMapper
* @group framework
*/
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
* @covers phpOMS\Localization\Defaults\Country
* @group framework
*/
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
* @covers phpOMS\Localization\Defaults\CurrencyMapper
* @group framework
*/
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
* @covers phpOMS\Localization\Defaults\Currency
* @group framework
*/
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
* @covers phpOMS\Localization\Defaults\IbanMapper
* @group framework
*/
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
* @covers phpOMS\Localization\Defaults\Iban
* @group framework
*/
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
* @covers phpOMS\Localization\Defaults\LanguageMapper
* @group framework
*/
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
* @covers phpOMS\Localization\Defaults\Language
* @group framework
*/
public function testDefaults() : void

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -21,6 +21,10 @@ use phpOMS\Stdlib\Base\NullLocation;
*/
final class NullLocationTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers phpOMS\Stdlib\Base\NullLocation
* @group framework
*/
public function testNullLocation() : void
{
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
{
/**
* @covers phpOMS\System\File\PathException
* @group framework
*/
public function testConstructor() : void
{
$e = new PathException('test.file');

View File

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