Skip to content

Commit

Permalink
Merge branch 'main' into magickExclude
Browse files Browse the repository at this point in the history
  • Loading branch information
tnylea committed Sep 16, 2024
2 parents 2afd8ab + be4cfd0 commit b785a33
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ jobs:

- name: Upload Screenshots
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: screenshots
path: tests/Browser/screenshots
- name: Upload Console Logs
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: console
path: tests/Browser/console
Expand Down
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
});

Route::middleware(['web'])->group(function () {
// Add social routes
// Add social redirect and callback routes
Route::get('auth/{driver}/redirect', [SocialController::class, 'redirect']);
Route::get('auth/{driver}/callback', [SocialController::class, 'callback']);

Expand Down
4 changes: 2 additions & 2 deletions src/Actions/TwoFactorAuth/GenerateQrCodeAndSecretKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class GenerateQrCodeAndSecretKey
public function __invoke($user): array
{

$google2fa = new Google2FA();
$google2fa = new Google2FA;
$secret_key = $google2fa->generateSecretKey();

$this->companyName = 'Auth';
Expand All @@ -38,7 +38,7 @@ public function __invoke($user): array
$writer = new Writer(
new ImageRenderer(
new RendererStyle(800),
new ImagickImageBackEnd()
new ImagickImageBackEnd
)
);

Expand Down
2 changes: 1 addition & 1 deletion src/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function register()

// Bind a singleton for the Google2FA service
$this->app->singleton(Google2FA::class, function ($app) {
return new Google2FA();
return new Google2FA;
});

// Register the DuskServiceProvider
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/HasConfigs.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private function arrayToObject($array)
return $array;
}

$object = new \stdClass();
$object = new \stdClass;
foreach ($array as $key => $value) {
$object->$key = $this->arrayToObject($value);
}
Expand Down
Empty file removed tests/Browser/LogoutTest.php
Empty file.
8 changes: 1 addition & 7 deletions tests/DuskTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,14 @@ abstract class DuskTestCase extends BaseTestCase
{
use UsesDuskApiConfig;

// protected function setUp(): void
// {
// // $this->resetConfig();
// parent::setUp();
// }

/**
* Prepare for Dusk test execution.
*/
#[BeforeClass]
public static function prepare(): void
{
if (! static::runningInSail()) {
static::startChromeDriver();
static::startChromeDriver(['--port=9515']);
}
}

Expand Down
11 changes: 4 additions & 7 deletions tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@
// Illuminate\Foundation\Testing\DatabaseMigrations::class,
)->in('Browser');

use Illuminate\Foundation\Testing\RefreshDatabase;

/*
|--------------------------------------------------------------------------
| Test Case
|--------------------------------------------------------------------------
|
| The closure you provide to your test functions is always bound to a specific PHPUnit test
| case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may
| need to change it using the "uses()" function to bind a different classes or traits.
| need to change it using the "pest()" function to bind a different classes or traits.
|
*/

uses(
Tests\TestCase::class,
RefreshDatabase::class,
)->in('Feature');
pest()->extend(Tests\TestCase::class)
->use(Illuminate\Foundation\Testing\RefreshDatabase::class)
->in('Feature');

/*
|--------------------------------------------------------------------------
Expand Down
8 changes: 1 addition & 7 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@
namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\Artisan;

abstract class TestCase extends BaseTestCase
{
protected function setUp(): void
{
parent::setUp();
Artisan::call('view:clear');

}
//
}

0 comments on commit b785a33

Please sign in to comment.