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

Add return types for functions in tests #815

Merged
merged 1 commit into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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