From 830ad896b5facbcf542c3166edcb3537a39ef59c Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 22 Feb 2024 18:14:16 +0000 Subject: [PATCH] Merge pull request #1582 from hydephp/remove-global-function-imports-from-tests Remove global function imports from tests https://github.com/hydephp/develop/commit/f68daafe5ce5a3f2eb3df6329eb51e0409c75649 --- tests/Feature/Commands/PublishViewsCommandTest.php | 2 -- tests/Feature/ConfigurableSourceRootsFeatureTest.php | 6 ------ tests/Feature/HydeExtensionFeatureTest.php | 2 -- tests/Feature/HydeServiceProviderTest.php | 9 --------- tests/Feature/NavigationMenuTest.php | 4 ---- tests/Feature/Services/HydeSmartDocsTest.php | 6 ------ tests/Feature/SidebarViewTest.php | 6 ------ tests/Feature/TypedConfigFacadeTest.php | 2 -- .../RelativeLinksAcrossPagesRetainsIntegrityTest.php | 3 --- tests/Unit/SchemaContractsTest.php | 11 ----------- tests/Unit/Views/FeaturedImageViewTest.php | 7 ------- tests/Unit/Views/StylesComponentViewTest.php | 3 --- 12 files changed, 61 deletions(-) diff --git a/tests/Feature/Commands/PublishViewsCommandTest.php b/tests/Feature/Commands/PublishViewsCommandTest.php index 15391833..19082391 100644 --- a/tests/Feature/Commands/PublishViewsCommandTest.php +++ b/tests/Feature/Commands/PublishViewsCommandTest.php @@ -8,8 +8,6 @@ use Hyde\Testing\TestCase; use Illuminate\Support\Facades\File; -use function is_dir; - /** * @covers \Hyde\Console\Commands\PublishViewsCommand */ diff --git a/tests/Feature/ConfigurableSourceRootsFeatureTest.php b/tests/Feature/ConfigurableSourceRootsFeatureTest.php index 1fa0cd67..0e86d7b8 100644 --- a/tests/Feature/ConfigurableSourceRootsFeatureTest.php +++ b/tests/Feature/ConfigurableSourceRootsFeatureTest.php @@ -4,18 +4,12 @@ namespace Hyde\Framework\Testing\Feature; -use function app; -use function config; -use function file_put_contents; - use Hyde\Framework\HydeServiceProvider; use Hyde\Hyde; use Hyde\Pages\MarkdownPage; use Hyde\Testing\TestCase; use Illuminate\Support\Facades\File; -use function mkdir; - /** * Test the overall functionality of the configurable source roots feature. * diff --git a/tests/Feature/HydeExtensionFeatureTest.php b/tests/Feature/HydeExtensionFeatureTest.php index b33a38f4..6ed83dd5 100644 --- a/tests/Feature/HydeExtensionFeatureTest.php +++ b/tests/Feature/HydeExtensionFeatureTest.php @@ -20,8 +20,6 @@ use InvalidArgumentException; use stdClass; -use function app; - /** * Tests the Extensions API Feature on a higher level to ensure the components work together. * diff --git a/tests/Feature/HydeServiceProviderTest.php b/tests/Feature/HydeServiceProviderTest.php index e350de91..d48d2293 100644 --- a/tests/Feature/HydeServiceProviderTest.php +++ b/tests/Feature/HydeServiceProviderTest.php @@ -4,13 +4,6 @@ namespace Hyde\Framework\Testing\Feature; -use function app; -use function array_map; -use function basename; -use function config; -use function get_class; -use function glob; - use Hyde\Console\ConsoleServiceProvider; use Hyde\Framework\HydeServiceProvider; use Hyde\Framework\Services\AssetService; @@ -25,8 +18,6 @@ use Hyde\Testing\TestCase; use Illuminate\Support\Facades\Artisan; -use function method_exists; - /** * @covers \Hyde\Framework\HydeServiceProvider * @covers \Hyde\Framework\Concerns\RegistersFileLocations diff --git a/tests/Feature/NavigationMenuTest.php b/tests/Feature/NavigationMenuTest.php index a6c2a185..a36346e4 100644 --- a/tests/Feature/NavigationMenuTest.php +++ b/tests/Feature/NavigationMenuTest.php @@ -6,10 +6,6 @@ use BadMethodCallException; use Hyde\Support\Models\Route; - -use function collect; -use function config; - use Hyde\Foundation\Facades\Routes; use Hyde\Framework\Features\Navigation\DropdownNavItem; use Hyde\Framework\Features\Navigation\NavigationMenu; diff --git a/tests/Feature/Services/HydeSmartDocsTest.php b/tests/Feature/Services/HydeSmartDocsTest.php index a44ffcd9..0ee6fdec 100644 --- a/tests/Feature/Services/HydeSmartDocsTest.php +++ b/tests/Feature/Services/HydeSmartDocsTest.php @@ -4,17 +4,11 @@ namespace Hyde\Framework\Testing\Feature\Services; -use function app; -use function config; - use Hyde\Framework\Features\Documentation\SemanticDocumentationArticle; use Hyde\Pages\DocumentationPage; use Hyde\Testing\TestCase; use Illuminate\Support\HtmlString; -use function str_replace; -use function view; - /** * @covers \Hyde\Framework\Features\Documentation\SemanticDocumentationArticle */ diff --git a/tests/Feature/SidebarViewTest.php b/tests/Feature/SidebarViewTest.php index 44840e64..005b2421 100644 --- a/tests/Feature/SidebarViewTest.php +++ b/tests/Feature/SidebarViewTest.php @@ -12,12 +12,6 @@ use Illuminate\Contracts\View\View; use Throwable; -use function config; -use function file_put_contents; -use function realpath; -use function view; -use function e; - /** * Very high level test of the sidebar views and their combinations of layouts. * diff --git a/tests/Feature/TypedConfigFacadeTest.php b/tests/Feature/TypedConfigFacadeTest.php index 2f0afd3e..b313dc2d 100644 --- a/tests/Feature/TypedConfigFacadeTest.php +++ b/tests/Feature/TypedConfigFacadeTest.php @@ -9,8 +9,6 @@ use TypeError; use stdClass; -use function config; - /** * @covers \Hyde\Facades\Config */ diff --git a/tests/Unit/RelativeLinksAcrossPagesRetainsIntegrityTest.php b/tests/Unit/RelativeLinksAcrossPagesRetainsIntegrityTest.php index 587857d2..c263016b 100644 --- a/tests/Unit/RelativeLinksAcrossPagesRetainsIntegrityTest.php +++ b/tests/Unit/RelativeLinksAcrossPagesRetainsIntegrityTest.php @@ -9,9 +9,6 @@ use Hyde\Foundation\Facades\Routes; use Hyde\Framework\Actions\StaticPageBuilder; use Hyde\Framework\Actions\CreatesNewMarkdownPostFile; - -use function config; - use Hyde\Framework\Concerns\InteractsWithDirectories; use Hyde\Hyde; use Hyde\Testing\TestCase; diff --git a/tests/Unit/SchemaContractsTest.php b/tests/Unit/SchemaContractsTest.php index 9f9f6d12..270c1f2c 100644 --- a/tests/Unit/SchemaContractsTest.php +++ b/tests/Unit/SchemaContractsTest.php @@ -13,17 +13,6 @@ use Hyde\Testing\UnitTestCase; use Illuminate\Support\Str; -use function array_filter; -use function array_map; -use function array_merge; -use function array_values; -use function basename; -use function defined; -use function file_get_contents; -use function glob; -use function is_subclass_of; -use function substr_count; - /** * A state test to ensure the schemas can't be changed without breaking the tests. * This requires contributors to consider the impact of their changes as schema changes are rarely backwards compatible. diff --git a/tests/Unit/Views/FeaturedImageViewTest.php b/tests/Unit/Views/FeaturedImageViewTest.php index 8d60759d..3e6fa630 100644 --- a/tests/Unit/Views/FeaturedImageViewTest.php +++ b/tests/Unit/Views/FeaturedImageViewTest.php @@ -4,19 +4,12 @@ namespace Hyde\Framework\Testing\Unit\Views; -use function array_merge; - use Hyde\Framework\Factories\FeaturedImageFactory; use Hyde\Framework\Features\Blogging\Models\FeaturedImage; use Hyde\Markdown\Models\FrontMatter; use Hyde\Pages\MarkdownPost; use Hyde\Testing\TestCase; -use function str_replace; -use function strip_tags; -use function trim; -use function view; - /** * @see resources/views/components/post/image.blade.php */ diff --git a/tests/Unit/Views/StylesComponentViewTest.php b/tests/Unit/Views/StylesComponentViewTest.php index 36a30f7c..bfe078d0 100644 --- a/tests/Unit/Views/StylesComponentViewTest.php +++ b/tests/Unit/Views/StylesComponentViewTest.php @@ -5,9 +5,6 @@ namespace Hyde\Framework\Testing\Unit\Views; use Hyde\Facades\Filesystem; - -use function config; - use Hyde\Facades\Asset; use Hyde\Hyde; use Hyde\Support\Facades\Render;