Support for generators in assertCount() etc. is not marked as deprecated in PHPUnit 9.6 #4618
Labels
feature/assertion
Issues related to assertions and expectations
type/bug
Something is broken
type/deprecation
Something will be/is deprecated
version/9
Something affects PHPUnit 9
Summary
I am aware that using generators in count related assertions is deprecated, but there seems to be some cases where it has not been deprecated properly(?)
Current behavior
assertNotEmpty with empty generator, no warning
❌ Should trigger warning as this doesn't even work.
assertNotEmpty with non-empty generator
❌ Should trigger warning.
assertEmpty with empty generator
🆗 Could argue that this is ok as it sort-of says that Generators are not supported.
assertCount with empty generator
❓ Weird.
assertCount with generator where assertion fails
This is just weird and might not be relevant.
🆗 Asserting count is 1 will make this test pass and a warning will be sent.
Expected behavior
Warning with the message:
Related to #4568
The text was updated successfully, but these errors were encountered: