Skip to content

Commit 1b84002

Browse files
committed
fix: unit tests
Change-Id: I123ebe4cbd8a0d1e6518ca93c5431f972812a758
1 parent 250970a commit 1b84002

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

database/seeds/TestSeeder.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use App\Models\OAuth2\Factories\ApiScopeFactory;
1717
use App\Models\OAuth2\Factories\ResourceServerFactory;
1818
use Illuminate\Support\Facades\Config;
19+
use models\exceptions\EntityNotFoundException;
1920
use Models\OAuth2\Api;
2021
use OAuth2\Models\IClient;
2122
use OAuth2\OAuth2Protocol;
@@ -382,6 +383,11 @@ private function createTestUsers(){
382383

383384
foreach ($user_payloads as $payload){
384385
$user = UserFactory::build($payload);
386+
if (isset($payload['groups'])) {
387+
foreach ($payload['groups'] as $group) {
388+
$user->addToGroup($group);
389+
}
390+
}
385391
EntityManager::persist($user);
386392
$raw_password = $payload['password'];
387393
if(!$user->checkPassword($raw_password))

0 commit comments

Comments
 (0)