Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Add return types for functions in tests (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Michot authored Jun 21, 2021
1 parent 3438c96 commit 8abf4ad
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/Messaging/Jobs/AppUninstalledTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function setUp(): void
parent::setUp();
}

public function testJobSoftDeletesShopAndCharges()
public function testJobSoftDeletesShopAndCharges(): void
{
// Create a plan
$plan = factory(Plan::class)->states('type_recurring')->create();
Expand Down
2 changes: 1 addition & 1 deletion tests/Services/CookieHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function setUp(): void
/**
* Originally from @jedimdan in previous iteration.
*/
public function testSameSiteCookie()
public function testSameSiteCookie(): void
{
foreach ($this->badUserAgents as $agent) {
$_SERVER['HTTP_USER_AGENT'] = $agent;
Expand Down
2 changes: 1 addition & 1 deletion tests/Stubs/OrdersCreateJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct($shopDomain, $data)
$this->data = $data;
}

public function handle()
public function handle(): void
{
// Do what you wish with the data
}
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function getEnvironmentSetUp($app): void
$app['config']->set('auth.providers.users.model', UserStub::class);
}

protected function setupDatabase($app)
protected function setupDatabase($app): void
{
// Run Laravel migrations
$this->loadLaravelMigrations();
Expand All @@ -63,7 +63,7 @@ protected function setupDatabase($app)
$this->artisan('migrate')->run();
}

protected function swapEnvironment(string $env, Closure $fn)
protected function swapEnvironment(string $env, Closure $fn): void
{
// Get the current environemnt
$currentEnv = App::environment();
Expand Down
2 changes: 1 addition & 1 deletion tests/Traits/ShopModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function testOfflineToken(): void
$this->assertTrue($shop->hasOfflineAccess());
}

public function testNamespacingAndFreemium()
public function testNamespacingAndFreemium(): void
{
$this->app['config']->set('shopify-app.billing_freemium_enabled', true);
$this->app['config']->set('shopify-app.namespace', 'app');
Expand Down

0 comments on commit 8abf4ad

Please sign in to comment.