diff --git a/tests/Feature/ArrayDriverTest.php b/tests/Feature/ArrayDriverTest.php index 88c4c16..ac162b9 100644 --- a/tests/Feature/ArrayDriverTest.php +++ b/tests/Feature/ArrayDriverTest.php @@ -11,9 +11,9 @@ use Laravel\Pennant\Events\AllFeaturesPurged; use Laravel\Pennant\Events\FeatureDeleted; use Laravel\Pennant\Events\FeatureResolved; -use Laravel\Pennant\Events\FeaturesPurged; use Laravel\Pennant\Events\FeatureUpdated; use Laravel\Pennant\Events\FeatureUpdatedForAllScopes; +use Laravel\Pennant\Events\FeaturesPurged; use Laravel\Pennant\Events\UnexpectedNullScopeEncountered; use Laravel\Pennant\Events\UnknownFeatureResolved; use Laravel\Pennant\Feature; @@ -21,6 +21,8 @@ use Tests\TestCase; use Workbench\App\Models\User; +use function Orchestra\Testbench\workbench_path; + class ArrayDriverTest extends TestCase { protected function setUp(): void @@ -858,13 +860,13 @@ public function test_it_can_set_for_all() public function test_it_can_auto_register_feature_classes() { Feature::define('marketing-design', 'marketing-design-value'); - Feature::discover('Tests\\FeatureClasses', __DIR__.'/../FeatureClasses'); + Feature::discover('Workbench\\App\\Features', workbench_path('app/Features')); $all = Feature::all(); $this->assertSame([ 'marketing-design' => 'marketing-design-value', - 'Tests\\FeatureClasses\\NewApi' => 'new-api-value', + 'Workbench\\App\\Features\\NewApi' => 'new-api-value', ], $all); } diff --git a/tests/Feature/DatabaseDriverTest.php b/tests/Feature/DatabaseDriverTest.php index d5b3bcf..1e2adb1 100644 --- a/tests/Feature/DatabaseDriverTest.php +++ b/tests/Feature/DatabaseDriverTest.php @@ -22,6 +22,8 @@ use Workbench\App\Models\User; use Workbench\Database\Factories\UserFactory; +use function Orchestra\Testbench\workbench_path; + class DatabaseDriverTest extends TestCase { use RefreshDatabase; @@ -1044,13 +1046,13 @@ public function test_it_can_set_for_all() public function test_it_can_auto_register_feature_classes() { Feature::define('marketing-design', 'marketing-design-value'); - Feature::discover('Tests\\FeatureClasses', __DIR__.'/../FeatureClasses'); + Feature::discover('Workbench\\App\\Features', workbench_path('app/Features')); $all = Feature::all(); $this->assertSame([ 'marketing-design' => 'marketing-design-value', - 'Tests\\FeatureClasses\\NewApi' => 'new-api-value', + 'Workbench\\App\\Features\\NewApi' => 'new-api-value', ], $all); } diff --git a/tests/FeatureClasses/NewApi.php b/workbench/app/Features/NewApi.php similarity index 76% rename from tests/FeatureClasses/NewApi.php rename to workbench/app/Features/NewApi.php index a2b03fa..713077a 100644 --- a/tests/FeatureClasses/NewApi.php +++ b/workbench/app/Features/NewApi.php @@ -1,6 +1,6 @@