diff --git a/tests/Http/Controllers/LocationsTest.php b/tests/Http/Controllers/LocationsTest.php index e2aef9f..42b52d0 100644 --- a/tests/Http/Controllers/LocationsTest.php +++ b/tests/Http/Controllers/LocationsTest.php @@ -51,7 +51,7 @@ 'X-IGNITER-REQUEST-HANDLER' => 'onSetDefault', ]); - Location::$defaultModels = []; + Location::clearDefaultModel(); expect(Location::getDefaultKey())->toBe($location->getKey()); }); diff --git a/tests/Models/LocationAreaTest.php b/tests/Models/LocationAreaTest.php index 504d8da..af89372 100644 --- a/tests/Models/LocationAreaTest.php +++ b/tests/Models/LocationAreaTest.php @@ -192,7 +192,7 @@ 'boundaries' => [ 'components' => [ ['type' => 'locality', 'value' => 'White City'], - ['type' => 'postal_code', 'value' => 'Country'], + ['type' => 'postal_code', 'value' => 'Country'], // Invalid postal code ], ], ]); diff --git a/tests/Models/LocationTest.php b/tests/Models/LocationTest.php index 2e21647..6ca2261 100644 --- a/tests/Models/LocationTest.php +++ b/tests/Models/LocationTest.php @@ -25,7 +25,7 @@ }); it('checks if onboarding is complete with valid default location', function() { - Location::$defaultModels = []; + Location::clearDefaultModel(); $location = Location::factory()->create([ 'location_lat' => '12.345678', 'location_lng' => '98.765432', @@ -39,10 +39,10 @@ }); it('checks if onboarding is incomplete without default location', function() { - Location::$defaultModels = []; + Location::clearDefaultModel(); $default = Location::getDefault(); $default->delete(); - Location::$defaultModels = []; + Location::clearDefaultModel(); $result = Location::onboardingIsComplete();