Skip to content

Commit

Permalink
Raise coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Jan 25, 2024
1 parent 06a7d5e commit ddd928e
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Tests for fed:ApplicationServiceEndpoint.
*
* @covers \SimpleSAML\WSSecurity\XML\fed\ApplicationServiceEndpoint
* @covers \SimpleSAML\WSSecurity\XML\fed\AbstractApplicationServiceEndpoint
* @covers \SimpleSAML\WSSecurity\XML\fed\AbstractEndpointType
* @covers \SimpleSAML\WSSecurity\XML\fed\AbstractFedElement
* @package tvdijen/ws-security
Expand Down
9 changes: 9 additions & 0 deletions tests/WSSecurity/XML/fed/PseudonymBasisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,13 @@ public function testMarshalling(): void
strval($pseudonymBasis),
);
}


/**
*/
public function testMarshallingEmpty(): void
{
$pseudonymBasis = new PseudonymBasis();

Check failure on line 75 in tests/WSSecurity/XML/fed/PseudonymBasisTest.php

View workflow job for this annotation

GitHub Actions / Quality control

TooFewArguments

tests/WSSecurity/XML/fed/PseudonymBasisTest.php:75:27: TooFewArguments: Too few arguments for SimpleSAML\WSSecurity\XML\fed\PseudonymBasis::__construct - expecting child to be passed (see https://psalm.dev/025)
$this->assertTrue($pseudonymBasis->isEmptyElement());
}
}
1 change: 1 addition & 0 deletions tests/WSSecurity/XML/wst/CodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Class \SimpleSAML\WSSecurity\XML\wst\CodeTest
*
* @covers \SimpleSAML\WSSecurity\XML\wst\Code
* @covers \SimpleSAML\WSSecurity\XML\wst\AbstractStatusCodeTypeOpenEnum
* @covers \SimpleSAML\WSSecurity\XML\wst\AbstractWstElement
*
* @package tvdijen/ws-security
Expand Down
1 change: 1 addition & 0 deletions tests/WSSecurity/XML/wst/ComputedKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Class \SimpleSAML\WSSecurity\XML\wst\ComputedKeyTest
*
* @covers \SimpleSAML\WSSecurity\XML\wst\ComputedKey
* @covers \SimpleSAML\WSSecurity\XML\wst\AbstractComputedKeyOpenEnum
* @covers \SimpleSAML\WSSecurity\XML\wst\AbstractWstElement
*
* @package tvdijen/ws-security
Expand Down
1 change: 1 addition & 0 deletions tests/WSSecurity/XML/wst/KeyTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Class \SimpleSAML\WSSecurity\XML\wst\KeyTypeTest
*
* @covers \SimpleSAML\WSSecurity\XML\wst\KeyType
* @covers \SimpleSAML\WSSecurity\XML\wst\AbstractKeyTypeOpenEnum
* @covers \SimpleSAML\WSSecurity\XML\wst\AbstractWstElement
*
* @package tvdijen/ws-security
Expand Down
2 changes: 1 addition & 1 deletion tests/WSSecurity/XML/wst/ParticipantsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Class \SimpleSAML\WSSecurity\XML\wst\ParticipantsTest
*
* @covers \SimpleSAML\WSSecurity\XML\wst\Participants
* @covers \SimpleSAML\WSSecurity\XML\wst\AbstractParticipantType
* @covers \SimpleSAML\WSSecurity\XML\wst\AbstractParticipantsType
* @covers \SimpleSAML\WSSecurity\XML\wst\AbstractWstElement
*
* @package tvdijen/ws-security
Expand Down
11 changes: 11 additions & 0 deletions tests/WSSecurity/XML/wst/SignChallengeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,15 @@ public function testMarshalling(): void
strval($signChallenge),
);
}


/**
* Test creating an empty SignChallenge object from scratch.
*/
public function testMarshallingEmpty(): void
{
$singChallenge = new SignChallenge();

$this->assertTrue($signChallenge->isEmptyElement());

Check failure on line 78 in tests/WSSecurity/XML/wst/SignChallengeTest.php

View workflow job for this annotation

GitHub Actions / Quality control

UndefinedVariable

tests/WSSecurity/XML/wst/SignChallengeTest.php:78:27: UndefinedVariable: Cannot find referenced variable $signChallenge (see https://psalm.dev/024)
}
}
1 change: 1 addition & 0 deletions tests/WSSecurity/XML/wst/StatusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Class \SimpleSAML\WSSecurity\XML\wst\StatusTest
*
* @covers \SimpleSAML\WSSecurity\XML\wst\Status
* @covers \SimpleSAML\WSSecurity\XML\wst\AbstractStatusType
* @covers \SimpleSAML\WSSecurity\XML\wst\AbstractWstElement
*
* @package tvdijen/ws-security
Expand Down

0 comments on commit ddd928e

Please sign in to comment.