-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit test coverage for IssuerBuilder setMetaDataProviderBuilder()
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ public function build(string $resource): IssuerInterface | |
{ | ||
return $this->issuerBuilder->build($resource); | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
service-api/app/test/AppTest/Service/Authentication/IssuerBuilderTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace AppTest\Service\Authentication; | ||
|
||
use App\Service\Authentication\IssuerBuilder; | ||
use Facile\OpenIDClient\Issuer\Metadata\Provider\MetadataProviderBuilder; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class IssuerBuilderTest extends TestCase | ||
{ | ||
private IssuerBuilder $issuerBuilder; | ||
public function setUp(): void | ||
{ | ||
$this->issuerBuilder = new IssuerBuilder(); | ||
} | ||
|
||
/** @test */ | ||
public function can_set_metadata_provider_builder(): void | ||
{ | ||
$issuerBuilder = $this->issuerBuilder->setMetadataProviderBuilder(new MetadataProviderBuilder()); | ||
self::assertInstanceOf(IssuerBuilder::class, $issuerBuilder); | ||
} | ||
} |