diff --git a/tests/Conf/TestConf.php b/tests/Conf/TestConf.php index 587bb68..ea607d4 100644 --- a/tests/Conf/TestConf.php +++ b/tests/Conf/TestConf.php @@ -3,7 +3,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; use org\bovigo\vfs\vfsStream; - +/** @covers \JKingWeb\Arsse\Conf */ class TestConf extends Test\AbstractTest { static $vfs; static $path; @@ -33,9 +33,7 @@ class TestConf extends Test\AbstractTest { $this->assertInstanceOf(Conf::class, new Conf()); } - /** - * @depends testLoadDefaultValues - */ + /** @depends testLoadDefaultValues */ function testImportFromArray() { $arr = ['lang' => "xx"]; $conf = new Conf(); @@ -43,9 +41,7 @@ class TestConf extends Test\AbstractTest { $this->assertEquals("xx", $conf->lang); } - /** - * @depends testImportFromArray - */ + /** @depends testImportFromArray */ function testImportFromFile() { $conf = new Conf(); $conf->importFile(self::$path."confGood"); @@ -54,50 +50,38 @@ class TestConf extends Test\AbstractTest { $this->assertEquals("xx", $conf->lang); } - /** - * @depends testImportFromFile - */ + /** @depends testImportFromFile */ function testImportFromMissingFile() { $this->assertException("fileMissing", "Conf"); $conf = new Conf(self::$path."confMissing"); } - /** - * @depends testImportFromFile - */ + /** @depends testImportFromFile */ function testImportFromEmptyFile() { $this->assertException("fileCorrupt", "Conf"); $conf = new Conf(self::$path."confEmpty"); } - /** - * @depends testImportFromFile - */ + /** @depends testImportFromFile */ function testImportFromFileWithoutReadPermission() { $this->assertException("fileUnreadable", "Conf"); $conf = new Conf(self::$path."confUnreadable"); } - /** - * @depends testImportFromFile - */ + /** @depends testImportFromFile */ function testImportFromFileWhichIsNotAnArray() { $this->assertException("fileCorrupt", "Conf"); $conf = new Conf(self::$path."confNotArray"); } - /** - * @depends testImportFromFile - */ + /** @depends testImportFromFile */ function testImportFromFileWhichIsNotPhp() { $this->assertException("fileCorrupt", "Conf"); // this should not print the output of the non-PHP file $conf = new Conf(self::$path."confNotPHP"); } - /** - * @depends testImportFromFile - */ + /** @depends testImportFromFile */ function testImportFromCorruptFile() { $this->assertException("fileCorrupt", "Conf"); $conf = new Conf(self::$path."confCorrupt"); diff --git a/tests/Db/SQLite3/Database/TestDatabaseArticleSQLite3.php b/tests/Db/SQLite3/Database/TestDatabaseArticleSQLite3.php index e27b59a..1a03414 100644 --- a/tests/Db/SQLite3/Database/TestDatabaseArticleSQLite3.php +++ b/tests/Db/SQLite3/Database/TestDatabaseArticleSQLite3.php @@ -2,6 +2,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; +/** @covers \JKingWeb\Arsse\Database */ class TestDatabaseArticleSQLite3 extends Test\AbstractTest { use Test\Database\Setup; use Test\Database\DriverSQLite3; diff --git a/tests/Db/SQLite3/Database/TestDatabaseFeedSQLite3.php b/tests/Db/SQLite3/Database/TestDatabaseFeedSQLite3.php index 10d663e..6af2982 100644 --- a/tests/Db/SQLite3/Database/TestDatabaseFeedSQLite3.php +++ b/tests/Db/SQLite3/Database/TestDatabaseFeedSQLite3.php @@ -2,6 +2,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; +/** @covers \JKingWeb\Arsse\Database */ class TestDatabaseFeedSQLite3 extends Test\AbstractTest { use Test\Database\Setup; use Test\Database\DriverSQLite3; diff --git a/tests/Db/SQLite3/Database/TestDatabaseFolderSQLite3.php b/tests/Db/SQLite3/Database/TestDatabaseFolderSQLite3.php index 2476f53..02b64dc 100644 --- a/tests/Db/SQLite3/Database/TestDatabaseFolderSQLite3.php +++ b/tests/Db/SQLite3/Database/TestDatabaseFolderSQLite3.php @@ -2,6 +2,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; +/** @covers \JKingWeb\Arsse\Database */ class TestDatabaseFolderSQLite3 extends Test\AbstractTest { use Test\Database\Setup; use Test\Database\DriverSQLite3; diff --git a/tests/Db/SQLite3/Database/TestDatabaseMetaSQLite3.php b/tests/Db/SQLite3/Database/TestDatabaseMetaSQLite3.php index 3356eec..87c22ec 100644 --- a/tests/Db/SQLite3/Database/TestDatabaseMetaSQLite3.php +++ b/tests/Db/SQLite3/Database/TestDatabaseMetaSQLite3.php @@ -2,6 +2,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; +/** @covers \JKingWeb\Arsse\Database */ class TestDatabaseMetaSQLite3 extends Test\AbstractTest { use Test\Database\Setup; use Test\Database\DriverSQLite3; diff --git a/tests/Db/SQLite3/Database/TestDatabaseSubscriptionSQLite3.php b/tests/Db/SQLite3/Database/TestDatabaseSubscriptionSQLite3.php index a9f9d39..9992d8f 100644 --- a/tests/Db/SQLite3/Database/TestDatabaseSubscriptionSQLite3.php +++ b/tests/Db/SQLite3/Database/TestDatabaseSubscriptionSQLite3.php @@ -2,6 +2,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; +/** @covers \JKingWeb\Arsse\Database */ class TestDatabaseSubscriptionSQLite3 extends Test\AbstractTest { use Test\Database\Setup; use Test\Database\DriverSQLite3; diff --git a/tests/Db/SQLite3/Database/TestDatabaseUserSQLite3.php b/tests/Db/SQLite3/Database/TestDatabaseUserSQLite3.php index d1e63b6..5bf1a1b 100644 --- a/tests/Db/SQLite3/Database/TestDatabaseUserSQLite3.php +++ b/tests/Db/SQLite3/Database/TestDatabaseUserSQLite3.php @@ -2,6 +2,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; +/** @covers \JKingWeb\Arsse\Database */ class TestDatabaseUserSQLite3 extends Test\AbstractTest { use Test\Database\Setup; use Test\Database\DriverSQLite3; diff --git a/tests/Db/SQLite3/TestDbDriverSQLite3.php b/tests/Db/SQLite3/TestDbDriverSQLite3.php index 8cd7a42..1562b26 100644 --- a/tests/Db/SQLite3/TestDbDriverSQLite3.php +++ b/tests/Db/SQLite3/TestDbDriverSQLite3.php @@ -2,7 +2,9 @@ declare(strict_types=1); namespace JKingWeb\Arsse; - +/** + * @covers \JKingWeb\Arsse\Db\SQLite3\Driver + * @covers \JKingWeb\Arsse\Db\SQLite3\ExceptionBuilder */ class TestDbDriverSQLite3 extends Test\AbstractTest { protected $data; protected $drv; diff --git a/tests/Db/SQLite3/TestDbResultSQLite3.php b/tests/Db/SQLite3/TestDbResultSQLite3.php index e9aaf13..a241119 100644 --- a/tests/Db/SQLite3/TestDbResultSQLite3.php +++ b/tests/Db/SQLite3/TestDbResultSQLite3.php @@ -2,7 +2,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; - +/** @covers \JKingWeb\Arsse\Db\SQLite3\Result */ class TestDbResultSQLite3 extends Test\AbstractTest { protected $c; diff --git a/tests/Db/SQLite3/TestDbStatementSQLite3.php b/tests/Db/SQLite3/TestDbStatementSQLite3.php index 50b6cfe..3d1cb6b 100644 --- a/tests/Db/SQLite3/TestDbStatementSQLite3.php +++ b/tests/Db/SQLite3/TestDbStatementSQLite3.php @@ -4,6 +4,9 @@ namespace JKingWeb\Arsse; use JKingWeb\Arsse\Db\Statement; +/** + * @covers \JKingWeb\Arsse\Db\SQLite3\Statement + * @covers \JKingWeb\Arsse\Db\SQLite3\ExceptionBuilder */ class TestDbStatementSQLite3 extends Test\AbstractTest { use Test\Db\BindingTests; @@ -11,6 +14,7 @@ class TestDbStatementSQLite3 extends Test\AbstractTest { static protected $imp = Db\SQLite3\Statement::class; function setUp() { + $this->clearData(); if(!extension_loaded("sqlite3")) { $this->markTestSkipped("SQLite extension not loaded"); } diff --git a/tests/Db/SQLite3/TestDbUpdateSQLite3.php b/tests/Db/SQLite3/TestDbUpdateSQLite3.php index 8b69531..18fea7b 100644 --- a/tests/Db/SQLite3/TestDbUpdateSQLite3.php +++ b/tests/Db/SQLite3/TestDbUpdateSQLite3.php @@ -4,6 +4,9 @@ namespace JKingWeb\Arsse; use org\bovigo\vfs\vfsStream; +/** + * @covers \JKingWeb\Arsse\Db\SQLite3\Driver + * @covers \JKingWeb\Arsse\Db\SQLite3\ExceptionBuilder */ class TestDbUpdateSQLite3 extends Test\AbstractTest { protected $data; protected $drv; diff --git a/tests/Exception/TestException.php b/tests/Exception/TestException.php index e1a5ac4..3697fb5 100644 --- a/tests/Exception/TestException.php +++ b/tests/Exception/TestException.php @@ -4,6 +4,7 @@ namespace JKingWeb\Arsse; Use Phake; +/** @covers \JKingWeb\Arsse\AbstractException */ class TestException extends Test\AbstractTest { function setUp() { $this->clearData(false); diff --git a/tests/Feed/TestFeed.php b/tests/Feed/TestFeed.php index 83cb577..e53754c 100644 --- a/tests/Feed/TestFeed.php +++ b/tests/Feed/TestFeed.php @@ -5,6 +5,7 @@ use JKingWeb\Arsse\Misc\Date; use Phake; +/** @covers \JKingWeb\Arsse\Feed */ class TestFeed extends Test\AbstractTest { protected static $host = "http://localhost:8000/"; protected $base = ""; diff --git a/tests/Feed/TestFeedFetching.php b/tests/Feed/TestFeedFetching.php index ab8de7c..3bad23a 100644 --- a/tests/Feed/TestFeedFetching.php +++ b/tests/Feed/TestFeedFetching.php @@ -4,6 +4,7 @@ namespace JKingWeb\Arsse; Use Phake; +/** @covers \JKingWeb\Arsse\Feed */ class TestFeedFetching extends Test\AbstractTest { protected static $host = "http://localhost:8000/"; protected $base = ""; diff --git a/tests/Lang/TestLang.php b/tests/Lang/TestLang.php index 6cb6726..63ec7bd 100644 --- a/tests/Lang/TestLang.php +++ b/tests/Lang/TestLang.php @@ -3,7 +3,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; use org\bovigo\vfs\vfsStream; - +/** @covers \JKingWeb\Arsse\Lang */ class TestLang extends Test\AbstractTest { use Test\Lang\Setup; diff --git a/tests/Lang/TestLangErrors.php b/tests/Lang/TestLangErrors.php index 966f653..bdf5338 100644 --- a/tests/Lang/TestLangErrors.php +++ b/tests/Lang/TestLangErrors.php @@ -3,7 +3,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; use org\bovigo\vfs\vfsStream; - +/** @covers \JKingWeb\Arsse\Lang */ class TestLangErrors extends Test\AbstractTest { use Test\Lang\Setup; diff --git a/tests/Lang/testLangComplex.php b/tests/Lang/testLangComplex.php index d4436fc..763e125 100644 --- a/tests/Lang/testLangComplex.php +++ b/tests/Lang/testLangComplex.php @@ -3,7 +3,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; use org\bovigo\vfs\vfsStream; - +/** @covers \JKingWeb\Arsse\Lang */ class TestLangComplex extends Test\AbstractTest { use Test\Lang\Setup; diff --git a/tests/Misc/TestContext.php b/tests/Misc/TestContext.php index cebb02c..9d20bc7 100644 --- a/tests/Misc/TestContext.php +++ b/tests/Misc/TestContext.php @@ -4,6 +4,7 @@ namespace JKingWeb\Arsse; use JKingWeb\Arsse\Misc\Context; +/** @covers \JKingWeb\Arsse\Misc\Context */ class TestContext extends Test\AbstractTest { function testVerifyInitialState() { $c = new Context; diff --git a/tests/REST/NextCloudNews/TestNCNV1_2.php b/tests/REST/NextCloudNews/TestNCNV1_2.php index 4641a4e..82c80c7 100644 --- a/tests/REST/NextCloudNews/TestNCNV1_2.php +++ b/tests/REST/NextCloudNews/TestNCNV1_2.php @@ -10,7 +10,7 @@ use JKingWeb\Arsse\Db\ExceptionInput; use JKingWeb\Arsse\Db\Transaction; use Phake; - +/** @covers \JKingWeb\Arsse\REST\NextCloudNews\V1_2 */ class TestNCNV1_2 extends Test\AbstractTest { protected $h; protected $feeds = [ // expected sample output of a feed list from the database, and the resultant expected transformation by the REST handler diff --git a/tests/REST/NextCloudNews/TestNCNVersionDiscovery.php b/tests/REST/NextCloudNews/TestNCNVersionDiscovery.php index 58e5e8d..07a307b 100644 --- a/tests/REST/NextCloudNews/TestNCNVersionDiscovery.php +++ b/tests/REST/NextCloudNews/TestNCNVersionDiscovery.php @@ -4,7 +4,7 @@ namespace JKingWeb\Arsse; use JKingWeb\Arsse\REST\Request; use JKingWeb\Arsse\REST\Response; - +/** @covers \JKingWeb\Arsse\REST\NextCloudNews\Versions */ class TestNCNVersionDiscovery extends Test\AbstractTest { function setUp() { $this->clearData(); diff --git a/tests/Service/TestService.php b/tests/Service/TestService.php index a97516d..7f1f82d 100644 --- a/tests/Service/TestService.php +++ b/tests/Service/TestService.php @@ -4,7 +4,7 @@ namespace JKingWeb\Arsse; use JKingWeb\Arsse\Misc\Date; use Phake; - +/** @covers \JKingWeb\Arsse\Service */ class TestService extends Test\AbstractTest { protected $srv; diff --git a/tests/User/TestAuthorization.php b/tests/User/TestAuthorization.php index a13eb6b..2841707 100644 --- a/tests/User/TestAuthorization.php +++ b/tests/User/TestAuthorization.php @@ -3,7 +3,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; use Phake; - +/** @covers \JKingWeb\Arsse\User */ class TestAuthorization extends Test\AbstractTest { const USERS = [ 'user@example.com' => User\Driver::RIGHTS_NONE, diff --git a/tests/User/TestUserInternalDriver.php b/tests/User/TestUserInternalDriver.php index b4d441d..9264c7f 100644 --- a/tests/User/TestUserInternalDriver.php +++ b/tests/User/TestUserInternalDriver.php @@ -2,7 +2,9 @@ declare(strict_types=1); namespace JKingWeb\Arsse; - +/** + * @covers \JKingWeb\Arsse\User + * @covers \JKingWeb\Arsse\User\Internal\Driver */ class TestUserInternalDriver extends Test\AbstractTest { use Test\User\CommonTests; diff --git a/tests/User/TestUserMockExternal.php b/tests/User/TestUserMockExternal.php index 6836642..d354ef7 100644 --- a/tests/User/TestUserMockExternal.php +++ b/tests/User/TestUserMockExternal.php @@ -2,7 +2,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; - +/** @covers \JKingWeb\Arsse\User */ class TestUserMockExternal extends Test\AbstractTest { use Test\User\CommonTests; diff --git a/tests/User/TestUserMockInternal.php b/tests/User/TestUserMockInternal.php index 84d378e..5454a6c 100644 --- a/tests/User/TestUserMockInternal.php +++ b/tests/User/TestUserMockInternal.php @@ -2,7 +2,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; - +/** @covers \JKingWeb\Arsse\User */ class TestUserMockInternal extends Test\AbstractTest { use Test\User\CommonTests; diff --git a/tests/lib/AbstractTest.php b/tests/lib/AbstractTest.php index 68a86e6..15e29e2 100644 --- a/tests/lib/AbstractTest.php +++ b/tests/lib/AbstractTest.php @@ -5,6 +5,7 @@ use JKingWeb\Arsse\Exception; use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Misc\Date; +/** @coversNothing */ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { function assertException(string $msg = "", string $prefix = "", string $type = "Exception") { diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 5114ee8..4a915a9 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -10,6 +10,12 @@ beStrictAboutTestSize="true" stopOnError="true"> + + + ../lib + + + Exception/TestException.php