mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-22 21:54:15 +02:00
Added @covers annotation to test classes
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Bootstrap\AppManager;
|
||||
use Slim\App;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Bootstrap\AppManager */
|
||||
class AppManangerTest extends TestCase
|
||||
{
|
||||
public function test_it_returns_an_app_instance(): void
|
||||
|
@@ -8,6 +8,7 @@ use Slim\App;
|
||||
use Slim\Middleware\ErrorMiddleware;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Bootstrap\ExceptionManager */
|
||||
class ExceptionManagerTest extends TestCase
|
||||
{
|
||||
public function test_it_sets_the_default_error_handler(): void
|
||||
|
@@ -7,6 +7,7 @@ use App\Middlewares;
|
||||
use Slim\App;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Bootstrap\MiddlewareManager */
|
||||
class MiddlewareManagerTest extends TestCase
|
||||
{
|
||||
/** @const Array of application middlewares */
|
||||
|
@@ -7,6 +7,7 @@ use App\Controllers;
|
||||
use Slim\App;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Bootstrap\RouteManager */
|
||||
class RouteManagerTest extends TestCase
|
||||
{
|
||||
public function test_it_registers_application_routes(): void
|
||||
|
@@ -11,6 +11,7 @@ use Symfony\Component\Finder\Finder;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Controllers\DirectoryController */
|
||||
class DirectoryControllerTest extends TestCase
|
||||
{
|
||||
/** @dataProvider configOptions */
|
||||
|
@@ -9,6 +9,7 @@ use Slim\Psr7\Response;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Controllers\FileInfoController */
|
||||
class FileInfoControllerTest extends TestCase
|
||||
{
|
||||
public function test_it_can_return_a_successful_response(): void
|
||||
|
@@ -8,6 +8,7 @@ use Slim\Psr7\Request;
|
||||
use Slim\Psr7\Response;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Controllers\IndexController */
|
||||
class IndexControllerTest extends TestCase
|
||||
{
|
||||
public function test_it_handles_a_file_info_request(): void
|
||||
|
@@ -11,6 +11,7 @@ use Symfony\Component\Finder\Finder;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Controllers\SearchController */
|
||||
class SearchControllerTest extends TestCase
|
||||
{
|
||||
public function test_it_returns_a_successful_response_for_a_search_request(): void
|
||||
|
@@ -10,6 +10,7 @@ use Symfony\Component\Finder\Finder;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Controllers\ZipController */
|
||||
class ZipControllerTest extends TestCase
|
||||
{
|
||||
public function test_it_returns_a_successful_response_for_a_zip_request(): void
|
||||
|
@@ -9,6 +9,7 @@ use Slim\Views\Twig;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Exceptions\ErrorHandler */
|
||||
class ErrorHandlerTest extends TestCase
|
||||
{
|
||||
public function test_it_returns_an_error(): void
|
||||
|
@@ -7,6 +7,7 @@ use App\Factories\CacheFactory;
|
||||
use Symfony\Component\Cache\Adapter;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Factories\CacheFactory */
|
||||
class CacheFactoryTest extends TestCase
|
||||
{
|
||||
/** @dataProvider cacheAdapters */
|
||||
|
@@ -9,6 +9,7 @@ use Symfony\Component\Finder\Finder;
|
||||
use Symfony\Component\Finder\SplFileInfo;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Factories\FinderFactory */
|
||||
class FinderFactoryTest extends TestCase
|
||||
{
|
||||
public function test_it_can_compose_the_finder_component(): void
|
||||
|
@@ -7,6 +7,7 @@ use App\Factories\TranslationFactory;
|
||||
use Symfony\Component\Translation\MessageCatalogue;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Factories\TranslationFactory */
|
||||
class TranslationFactoryTest extends TestCase
|
||||
{
|
||||
public function test_it_registers_the_translation_component(): void
|
||||
|
@@ -8,6 +8,7 @@ use Invoker\CallableResolver;
|
||||
use Slim\Views\Twig;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\Factories\TwigFactory */
|
||||
class TwigFactoryTest extends TestCase
|
||||
{
|
||||
public function test_it_can_compose_the_view_component(): void
|
||||
|
@@ -10,6 +10,7 @@ use Whoops\Handler\JsonResponseHandler;
|
||||
use Whoops\Handler\PrettyPageHandler;
|
||||
use Whoops\RunInterface;
|
||||
|
||||
/** @covers \App\Middlewares\WhoopsMiddleware */
|
||||
class WhoopsMiddlewareTest extends TestCase
|
||||
{
|
||||
public function test_it_registers_whoops_with_the_page_handler(): void
|
||||
|
@@ -6,6 +6,7 @@ use App\SortMethods\Accessed;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
/** @covers \App\SortMethods\Accessed */
|
||||
class AccessedTest extends TestCase
|
||||
{
|
||||
public function test_it_can_sort_by_accessed_time(): void
|
||||
|
@@ -6,6 +6,7 @@ use App\SortMethods\Changed;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
/** @covers \App\SortMethods\Changed */
|
||||
class ChangedTest extends TestCase
|
||||
{
|
||||
public function test_it_can_sort_by_changed_time(): void
|
||||
|
@@ -6,6 +6,7 @@ use App\SortMethods\Modified;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
/** @covers \App\SortMethods\Modified */
|
||||
class ModifiedTest extends TestCase
|
||||
{
|
||||
public function test_it_can_sort_by_modified_time(): void
|
||||
|
@@ -6,6 +6,7 @@ use App\SortMethods\Name;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
/** @covers \App\SortMethods\Name */
|
||||
class NameTest extends TestCase
|
||||
{
|
||||
public function test_it_can_sort_by_file_name(): void
|
||||
|
@@ -6,6 +6,7 @@ use App\SortMethods\Natural;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
/** @covers \App\SortMethods\Natural */
|
||||
class NaturalTest extends TestCase
|
||||
{
|
||||
public function test_it_can_sort_by_natural_file_name(): void
|
||||
|
@@ -6,6 +6,7 @@ use App\SortMethods\Type;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
/** @covers \App\SortMethods\Type */
|
||||
class TypeTest extends TestCase
|
||||
{
|
||||
public function test_it_can_sort_by_file_type(): void
|
||||
|
@@ -5,6 +5,7 @@ namespace Tests\Support;
|
||||
use App\Support\Helpers;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/** @covers \App\Support\Helpers */
|
||||
class HelpersTest extends TestCase
|
||||
{
|
||||
public function test_it_can_get_an_environment_variable(): void
|
||||
|
@@ -6,6 +6,7 @@ use App\Support\Str;
|
||||
use Tests\TestCase;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
|
||||
/** @covers \App\Support\Str */
|
||||
class StrTest extends TestCase
|
||||
{
|
||||
public function test_it_can_create_a_collection_from_a_string(): void
|
||||
|
@@ -4,6 +4,7 @@ namespace Tests;
|
||||
|
||||
use App\TemporaryFile;
|
||||
|
||||
/** @covers \App\TemporaryFile */
|
||||
class TemporaryFileTest extends TestCase
|
||||
{
|
||||
public function test_it_can_create_a_temporary_file(): void
|
||||
|
@@ -5,6 +5,7 @@ namespace Tests\ViewFunctions;
|
||||
use App\ViewFunctions\Asset;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\ViewFunctions\Asset */
|
||||
class AssetTest extends TestCase
|
||||
{
|
||||
public function test_it_can_return_an_asset_path(): void
|
||||
|
@@ -6,6 +6,7 @@ use App\ViewFunctions\Breadcrumbs;
|
||||
use Tests\TestCase;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
|
||||
/** @covers \App\ViewFunctions\Breadcrumbs */
|
||||
class BreadcrumbsTest extends TestCase
|
||||
{
|
||||
public function test_it_can_parse_breadcrumbs_from_the_path(): void
|
||||
|
@@ -5,6 +5,7 @@ namespace Tests\ViewFunctions;
|
||||
use App\ViewFunctions\Config;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\ViewFunctions\Config */
|
||||
class ConfigTest extends TestCase
|
||||
{
|
||||
public function test_it_can_retrieve_a_config_item(): void
|
||||
|
@@ -5,6 +5,7 @@ namespace Tests\ViewFunctions;
|
||||
use App\ViewFunctions\FileUrl;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\ViewFunctions\FileUrl */
|
||||
class FileUrlTest extends TestCase
|
||||
{
|
||||
public function test_it_can_return_a_url(): void
|
||||
|
@@ -7,6 +7,7 @@ use PHLAK\Config\Config;
|
||||
use Symfony\Component\Finder\SplFileInfo;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\ViewFunctions\Icon */
|
||||
class IconTest extends TestCase
|
||||
{
|
||||
/** @var Config Application config */
|
||||
|
@@ -6,6 +6,7 @@ use App\ViewFunctions\Markdown;
|
||||
use ParsedownExtra;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\ViewFunctions\Markdown */
|
||||
class MarkdownTest extends TestCase
|
||||
{
|
||||
public function test_it_can_parse_markdown_into_html(): void
|
||||
|
@@ -5,6 +5,7 @@ namespace Tests\ViewFunctions;
|
||||
use App\ViewFunctions\ParentUrl;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\ViewFunctions\ParentUrl */
|
||||
class ParentUrlTest extends TestCase
|
||||
{
|
||||
public function test_it_can_get_the_parent_directory(): void
|
||||
|
@@ -6,6 +6,7 @@ use App\ViewFunctions\SizeForHumans;
|
||||
use Symfony\Component\Finder\SplFileInfo;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\ViewFunctions\SizeForHumans */
|
||||
class SizeForHumansTest extends TestCase
|
||||
{
|
||||
public function test_it_can_convert_bytes_to_bytes(): void
|
||||
|
@@ -7,6 +7,7 @@ use Symfony\Component\Translation\Loader\ArrayLoader;
|
||||
use Symfony\Component\Translation\Translator;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\ViewFunctions\Translate */
|
||||
class TranslateTest extends TestCase
|
||||
{
|
||||
/** @var Translator Translator component */
|
||||
|
@@ -5,6 +5,7 @@ namespace Tests\ViewFunctions;
|
||||
use App\ViewFunctions\Url;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\ViewFunctions\Url */
|
||||
class UrlTest extends TestCase
|
||||
{
|
||||
public function test_it_can_return_a_url(): void
|
||||
|
@@ -5,6 +5,7 @@ namespace Tests\ViewFunctions;
|
||||
use App\ViewFunctions\ZipUrl;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\ViewFunctions\ZipUrl */
|
||||
class ZipUrlTest extends TestCase
|
||||
{
|
||||
public function test_it_can_return_a_url(): void
|
||||
|
Reference in New Issue
Block a user