mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-03 16:23:35 +08:00
Laravel 8 shift squash & merge (#3029)
* Temporarily moved back config path * Apply Laravel coding style * Shift exception handler * Shift HTTP kernel and middleware * Shift service providers * Convert options array to fluent methods * Shift to class based routes * Shift console routes * Ignore temporary framework files * Shift to class based factories * Namespace seeders * Shift PSR-4 autoloading * Shift config files * Default config files * Shift Laravel dependencies * Shift return type of base TestCase methods * Shift cleanup * Applied stylci style changes * Reverted config files location * Applied manual changes to Laravel 8 shift Co-authored-by: Shift <shift@laravelshift.com>
This commit is contained in:
@ -8,7 +8,7 @@ use Tests\TestCase;
|
||||
|
||||
class Saml2Test extends TestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
// Set default config for SAML2
|
||||
@ -119,7 +119,7 @@ class Saml2Test extends TestCase
|
||||
'saml2.remove_from_groups' => false,
|
||||
]);
|
||||
|
||||
$memberRole = factory(Role::class)->create(['external_auth_id' => 'member']);
|
||||
$memberRole = Role::factory()->create(['external_auth_id' => 'member']);
|
||||
$adminRole = Role::getSystemRole('admin');
|
||||
|
||||
$this->followingRedirects()->post('/saml2/acs', ['SAMLResponse' => $this->acsPostData]);
|
||||
@ -141,7 +141,7 @@ class Saml2Test extends TestCase
|
||||
$acsPost = $this->followingRedirects()->post('/saml2/acs', ['SAMLResponse' => $this->acsPostData]);
|
||||
$user = User::query()->where('external_auth_id', '=', 'user')->first();
|
||||
|
||||
$randomRole = factory(Role::class)->create(['external_auth_id' => 'random']);
|
||||
$randomRole = Role::factory()->create(['external_auth_id' => 'random']);
|
||||
$user->attachRole($randomRole);
|
||||
$this->assertContains($randomRole->id, $user->roles()->pluck('id'));
|
||||
|
||||
@ -295,7 +295,7 @@ class Saml2Test extends TestCase
|
||||
'saml2.remove_from_groups' => false,
|
||||
]);
|
||||
|
||||
$memberRole = factory(Role::class)->create(['external_auth_id' => 'member']);
|
||||
$memberRole = Role::factory()->create(['external_auth_id' => 'member']);
|
||||
$adminRole = Role::getSystemRole('admin');
|
||||
|
||||
$acsPost = $this->followingRedirects()->post('/saml2/acs', ['SAMLResponse' => $this->acsPostData]);
|
||||
|
Reference in New Issue
Block a user