Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Jul 16, 2024
1 parent 781739e commit d5fedb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/Cas/Protocol/Cas20.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ public function getProxyGrantingTicketIOU(): ?string

/**
* @param string $username
* @return \SimpleSAML\CAS\XML\cas\AuthenticationSuccess
* @return \SimpleSAML\CAS\XML\cas\ServiceResponse
*/
public function getValidateSuccessResponse(string $username): AuthenticationSuccess
public function getValidateSuccessResponse(string $username): ServiceResponse
{
$user = new User($username);

Expand Down Expand Up @@ -157,9 +157,10 @@ public function getValidateSuccessResponse(string $username): AuthenticationSucc
$attr,
);

$authenticationSucces = new AuthenticationSuccess($user, $attributes, $proxyGrantingTicket);
$authenticationSuccess = new AuthenticationSuccess($user, $attributes, $proxyGrantingTicket);
$serviceResponse = new ServiceResponse($authenticationSuccess);

return $authenticationSucces;
return $serviceResponse;
}


Expand Down
2 changes: 1 addition & 1 deletion tests/src/Cas/Protocol/Cas20Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ public function testAttributeToXmlConversion(): void

$xml = $casProtocol->getValidateSuccessResponse('myUser');

$this->assertEquals($this->document->saveXML(), $xml);
$this->assertEquals($this->document->saveXML(), strval($xml));

Check failure on line 57 in tests/src/Cas/Protocol/Cas20Test.php

View workflow job for this annotation

GitHub Actions / Unit tests, PHP 8.1, ubuntu-latest

Failed asserting that two strings are equal.

Check failure on line 57 in tests/src/Cas/Protocol/Cas20Test.php

View workflow job for this annotation

GitHub Actions / Unit tests, PHP 8.2, ubuntu-latest

Failed asserting that two strings are equal.

Check failure on line 57 in tests/src/Cas/Protocol/Cas20Test.php

View workflow job for this annotation

GitHub Actions / Unit tests, PHP 8.3, ubuntu-latest

Failed asserting that two strings are equal.

Check failure on line 57 in tests/src/Cas/Protocol/Cas20Test.php

View workflow job for this annotation

GitHub Actions / Unit tests, PHP 8.3, windows-latest

Failed asserting that two strings are equal.

Check failure on line 57 in tests/src/Cas/Protocol/Cas20Test.php

View workflow job for this annotation

GitHub Actions / Unit tests, PHP 8.2, windows-latest

Failed asserting that two strings are equal.
}
}

0 comments on commit d5fedb0

Please sign in to comment.