Skip to content

Commit

Permalink
Add unit test coverage for IssuerBuilder setMetaDataProviderBuilder()
Browse files Browse the repository at this point in the history
  • Loading branch information
MishNajam committed Oct 12, 2023
1 parent 5bb2ccc commit ca62110
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ public function build(string $resource): IssuerInterface
{
return $this->issuerBuilder->build($resource);

Check warning on line 29 in service-api/app/src/App/src/Service/Authentication/IssuerBuilder.php

View check run for this annotation

Codecov / codecov/patch

service-api/app/src/App/src/Service/Authentication/IssuerBuilder.php#L29

Added line #L29 was not covered by tests
}
}
}
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);
}
}

0 comments on commit ca62110

Please sign in to comment.