Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code coverage #106

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Code coverage #106

wants to merge 2 commits into from

Conversation

arti0090
Copy link
Contributor

@arti0090 arti0090 commented Oct 24, 2024

#96

Current state of coverage
image

usefull command:
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html=coverage/ -d --min-coverage=90 tests/Unit/

use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;

final class TrustedCertificateResolverTest extends TestCase
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even test this class?
If yes - is this correct and how to test RuntimeException of this class
If no - should I add this into phpunit.xml exclusions


public function test_it_resolved_indexed_tpay_transaction_channels(): void
{
$this->markTestSkipped('Issue with GetTpayTransactionsChannels');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot make it to work as this GetTpayTransactionsChannels throws:

Typed property GetTpayTransactionsChannels::$result must not be accessed before initialization

@@ -53,10 +53,6 @@ private function getInputClassFrom(array $context): ?string

private function getConstructorArgumentName(string $inputClass): string
{
if (!is_a($inputClass, $this->getSupportedInterface(), true)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not be even required as the function supports checks this upfront

<directory>src/Test</directory>
<directory>src/Twig</directory>

<!-- other files -->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok to exclude those files?

@@ -41,5 +41,37 @@

<extensions>
<extension class="Symfony\Component\Panther\ServerExtension" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<extension class="Symfony\Component\Panther\ServerExtension" />
<bootstrap class="Symfony\Component\Panther\ServerExtension" />

This can be changed from 10.5 phpunit - it will not throw that in this part XML is not valid

@arti0090 arti0090 mentioned this pull request Nov 5, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant