simplesamlphp / simplesamlphp/simplesamlphp-test-framework
test module with redirectTrustedURL
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- PHP
- Star
- 0
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi trong tests/src/Auth/Process/ExpiryDateTest.php, sau đó lần theo lệnh gọi từ src/Auth/Process/ExpiryDate.php:191 đến SimpleSAML/Utils/HTTP.php:1011. Kiểm tra thiết lập của framework kiểm thử xung quanh redirectTrustedURL và xác định hoàn tất là khi kiểm thử đơn vị kết thúc mà không có InvalidArgumentException.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- php
- Lĩnh vực
- testing
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100