simplesamlphp / simplesamlphp/simplesamlphp-test-framework
test module with redirectTrustedURL
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 0
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to write some unit tests to https://github.com/simplesamlphp/simplesamlphp-module-expirycheck/
is it possible to test Auth\ProcessingFilter in a module which uses a $httpUtils->redirectTrustedURL?
$filter->process($request);
throws this exception
InvalidArgumentException: Unable to parse base url: http://localhost
/xxx/simplesamlphp-module-expirycheck/vendor/simplesamlphp/simplesamlphp/src/SimpleSAML/Utils/HTTP.php:1011
/xxx/simplesamlphp-module-expirycheck/vendor/simplesamlphp/simplesamlphp/src/SimpleSAML/Utils/HTTP.php:886
/xxx/simplesamlphp-module-expirycheck/vendor/simplesamlphp/simplesamlphp/src/SimpleSAML/Utils/HTTP.php:954
/xxx/simplesamlphp-module-expirycheck/src/Auth/Process/ExpiryDate.php:191
/xxx/simplesamlphp-module-expirycheck/tests/src/Auth/Process/ExpiryDateTest.php:170
ERRORS!
Tests: 17, Assertions: 40, Errors: 1, Warnings: 1.
any help is welcome
Regards
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure in tests/src/Auth/Process/ExpiryDateTest.php, then trace the call from src/Auth/Process/ExpiryDate.php:191 into SimpleSAML/Utils/HTTP.php:1011. Check the test framework setup around redirectTrustedURL and define done as the unit test completing without the InvalidArgumentException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100