Codeception / Codeception/AspectMock

VerifyInvoke on static method calls to non-static methods

Đang mở
#65 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
784
Fork
132
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Static methods were introduced in PHP5, but we were allowed to make static calls to non-static methods with the '::' operator and call them as if they were static.

In my scenario, I have code I need to test where it makes a static call to a non-static method. AspectMock seems to behave as I would expect, I can mock the methods and give them return values and it's fine. My problem comes when I need to verify a method is invoked.

It is my observation that verifyInvoked (verifyInvokedOnce, verifyInvokedMultipleTimes) do not seem to keep count of the invocations when there is this kind of mismatch.

Is this intentional or is it a bug/feature request?

Thanks

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

Hướng nghiên cứu

No file, test, or entry point is named in the issue. Start by reproducing VerifyInvoke and its VerifyInvoked, VerifyInvokedOnce, and VerifyInvokedMultipleTimes variants with a static call to a non-static method; done means invocation counts are consistently verified or the behavior is documented as intentional.

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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.