Innmind\BlackBox\Application::filterOnTags()Innmind\BlackBox\PHPUnit\Framework\Attributes\DataProviderInnmind\BlackBox\PHPUnit\Framework\Attributes\GroupInnmind\BlackBox\Set::via()Innmind\BlackBox\Runner\Given::exclude()Innmind\BlackBox\Prove
- The callable passed to
Application::tryToProve()now has access to an instance ofProve
Innmind\BlackBox\Application::disableGlobalFunctions()Innmind\BlackBox\Runner\proof()Innmind\BlackBox\Runner\test()Innmind\BlackBox\Runner\given()Innmind\BlackBox\Runner\property()Innmind\BlackBox\Runner\properties()proof()test()given()property()properties()
Innmind\BlackBox\Application::useExhaustiveShrinking()
- By default now the shrinking stops when the type of error changes
- Support for PHPUnit
13
$assert->object()->instance()now check first if the class exist to allow to load aliases
- Support for Symfony
8
- Dependency to
innmind/json
Innmind\BlackBox\PHPUnit\Loadnow uses all declared data providers on a method (instead of just the first one)
Innmind\BlackBox\Set::exclude()
Innmind\BlackBox\Runner\Assert::fail()now returnsnever
- Scenario values weren't displayed on failure when coming from the PHPUnit bridge
Innmind\BlackBox\Set::enumerate()
Set::uuid()could only produce at most100values even when more asked
Set::composite()now longer produces an exhaustive matrix of all possibilities but random compositions
Set::composite()no longer hangs when a very restrictive filter is applied on it
Innmind\BlackBox\PHPUnit\Compatibility::prove()
Innmind\BlackBox\Application::allowProofsToNotMakeAnyAssertions()
- The number of scenarii per proof wasn't respected for properties
- Performance regression in the previous release
- Code in proofs generator were not covered by the code coverage report
Innmind\BlackBox\Set\Providerto allow classes to be factories ofSets without having to implement theSetinterface- Support for PHPUnit
12 Innmind\BlackBox\Set::flatMap()andInnmind\BlackBox\Set\Seed- Callables for
Set::map(),Set\Composite,Set\Decorate,Set\FromGeneratorandSet\Callcan now also returnSeeded values
- BlackBox now also accepts instances of
Set\Provideras input where it acceptsSets Innmind\BlackBox\Setis now afinal class- All classes that implemented the
Setinterface are now declared@internal - The template param of
Innmind\BlackBox\Setis now covariant for more flexibility Innmind\BlackBox\Set\Valueis now declared@internal
Innmind\BlackBox\Set\Call::of(), useInnmind\BlackBox\Set::call()insteadInnmind\BlackBox\Set\Chars::any(), useInnmind\BlackBox\Set::strings()->chars()insteadInnmind\BlackBox\Set\Chars::lowercaseLetter(), useInnmind\BlackBox\Set::strings()->chars()->lowercaseLetter()insteadInnmind\BlackBox\Set\Chars::uppercaseLetter(), useInnmind\BlackBox\Set::strings()->chars()->uppercaseLetter()insteadInnmind\BlackBox\Set\Chars::number(), useInnmind\BlackBox\Set::strings()->chars()->number()insteadInnmind\BlackBox\Set\Chars::ascii(), useInnmind\BlackBox\Set::strings()->chars()->ascii()insteadInnmind\BlackBox\Set\Chars::alphanumerical(), useInnmind\BlackBox\Set::strings()->chars()->alphanumerical()insteadInnmind\BlackBox\Set\Composite::immutable(), useInnmind\BlackBox\Set::compose()->immutable()insteadInnmind\BlackBox\Set\Composite::mutable(), useInnmind\BlackBox\Set::compose()->mutable()insteadInnmind\BlackBox\Set\Decorate::immutable(), useInnmind\BlackBox\Set->map()insteadInnmind\BlackBox\Set\Decorate::mutable(), useInnmind\BlackBox\Set::decorate()insteadInnmind\BlackBox\Set\Either::any(), useInnmind\BlackBox\Set::either()insteadInnmind\BlackBox\Set\Elements::of(), useInnmind\BlackBox\Set::of()insteadInnmind\BlackBox\Set\Email::any(), useInnmind\BlackBox\Set::email()insteadInnmind\BlackBox\Set\FromGenerator::of(), useInnmind\BlackBox\Set::generator()insteadInnmind\BlackBox\Set\FromGenerator::mutable(), useInnmind\BlackBox\Set::generator()->mutable()insteadInnmind\BlackBox\Set\Integers::any(), useInnmind\BlackBox\Set::integers()insteadInnmind\BlackBox\Set\Integers::between(), useInnmind\BlackBox\Set::integers()->between()insteadInnmind\BlackBox\Set\Integers::above(), useInnmind\BlackBox\Set::integers()->above()insteadInnmind\BlackBox\Set\Integers::below(), useInnmind\BlackBox\Set::integers()->below()insteadInnmind\BlackBox\Set\IntegersExceptZero::any(), useInnmind\BlackBox\Set::integers()->exceptZero()insteadInnmind\BlackBox\Set\NaturalNumbers::any(), useInnmind\BlackBox\Set::integers()->naturalNumbers()insteadInnmind\BlackBox\Set\NaturalNumbersExceptZero::any(), useInnmind\BlackBox\Set::integers()->naturalNumbersExceptZero()insteadInnmind\BlackBox\Set\Nullable::of(), useInnmind\BlackBox\Set->nullable()insteadInnmind\BlackBox\Set\Randomize::of(), useInnmind\BlackBox\Set->randomize()insteadInnmind\BlackBox\Set\RealNumbers::any(), useInnmind\BlackBox\Set::realNumbers()insteadInnmind\BlackBox\Set\RealNumbers::between(), useInnmind\BlackBox\Set::realNumbers()->between()insteadInnmind\BlackBox\Set\RealNumbers::above(), useInnmind\BlackBox\Set::realNumbers()->above()insteadInnmind\BlackBox\Set\RealNumbers::below(), useInnmind\BlackBox\Set::realNumbers()->below()insteadInnmind\BlackBox\Set\Sequence::of(), useInnmind\BlackBox\Set::sequence()insteadInnmind\BlackBox\Set\Strings::any(), useInnmind\BlackBox\Set::strings()insteadInnmind\BlackBox\Set\Strings::between(), useInnmind\BlackBox\Set::strings()->between()insteadInnmind\BlackBox\Set\Strings::atMost(), useInnmind\BlackBox\Set::strings()->atMost()insteadInnmind\BlackBox\Set\Strings::atLeast(), useInnmind\BlackBox\Set::strings()->atLeast()insteadInnmind\BlackBox\Set\Strings::madeOf(), useInnmind\BlackBox\Set::strings()->madeOf()insteadInnmind\BlackBox\Set\Tuple::of(), useInnmind\BlackBox\Set::tuple()insteadInnmind\BlackBox\Set\Type::any(), useInnmind\BlackBox\Set::type()insteadInnmind\BlackBox\Set\Unicode::strings(), useInnmind\BlackBox\Set::strings()->unicode()insteadInnmind\BlackBox\Set\Unicode::any(), useInnmind\BlackBox\Set::strings()->unicode()->char()insteadInnmind\BlackBox\Set\UnsafeStrings::any(), useInnmind\BlackBox\Set::strings()->unsafe()insteadInnmind\BlackBox\Set\Uuid::any(), useInnmind\BlackBox\Set::uuid()instead
- Support for PHP
8.4
- Support for PHPUnit 11
- By default the printer groups the proofs output in a GitHub Action
Innmind\BlackBox\Runner\Printer\Standard::disableGitHubOutput()
$assert->array()->contains()$assert->array()->not()->contains()
Innmind\BlackBox\PHPUnit\Framework\TestCase::assert()Innmind\BlackBox\Set\Tuple
$assert->same()message not being usedInnmind\BlackBox\Set\Sequenceshrinking process now correctly shrinks all values that do not affect the testInnmind\BlackBox\Set\Compositeshrinking process now correctly shrinks all values that do not affect the test
- The global function
propertyreturn type is nowInnmind\BlackBox\Runner\Proof\Propertyallowing you to name the property
- Thrown exceptions in properties weren't failing proofs
- When disabling memory limit it now longer tries to reset the memory limit to the previous value. (It seems PHP prevents setting the limit lower to the peak memory usage)
Innmind\BlackBox\Set\Callregenarate the value each time a scenario is run
- Clear the memory before printing a failing scenarion to make sure no values bleed between scenarii.
- Support for
symfony/var-dumper:~7.0
- Stats are correctly displayed in GitHub Actions even in case of a failure
- Assertion failures in properties were displayed as unexpected exceptions
- Uncaught exceptions in properties no longer crash the process
Innmind\BlackBox\PHPUnit\Framework\TestCase::expectException()Innmind\BlackBox\PHPUnit\Framework\TestCase::expectExceptionCode()Innmind\BlackBox\PHPUnit\Framework\TestCase::expectExceptionMessage()
Innmind\BlackBox\Set\MutuallyExclusivewasn't excluding strings in a different case
- Custom tags loaded from PHPUnit groups were discarded
Innmind\BlackBox\PHPUnit\Load::parseTagWith()Innmind\BlackBox\Application::stopOnFailure()Innmind\BlackBox\Application::map()Innmind\BlackBox\Application::when()
- For iTerm users a mark is now placed on failures allowing you to directly jump between errors
Innmind\BlackBox\PHPUnit\Framework\TestCaseInnmind\BlackBox\PHPUnit\LoadInnmind\BlackBox\Application::disableMemoryLimit()Innmind\BlackBox\Runner\Assert::matches()Innmind\BlackBox\Runner\Assert::time()Innmind\BlackBox\Runner\Assert::memory()Innmind\BlackBox\Set\SliceInnmind\BlackBox\Set\MutuallyExclusiveInnmind\BlackBox\Tag::ciInnmind\BlackBox\Tag::local
- The message
Failing scenarii:was always printed in PHPUnit output even when there was no failures
Innmind\BlackBox\PHPUnit\Compatibility::asDataProvider()Innmind\BlackBox\Application::disableGlobalFunctions()Innmind\BlackBox\Runner\prooffunctionInnmind\BlackBox\Runner\testfunctionInnmind\BlackBox\Runner\givenfunctionInnmind\BlackBox\Runner\propertyfunctionInnmind\BlackBox\Runner\propertiesfunction- PHPUnit extension now prints the generated data that resulted in an error
Innmind\BlackBox\PHPUnit\BlackBox::forAll()is now astaticmethod
- Increased the randomness between scenarii to avoid collisions when validating a model with state.
Innmind\BlackBox\Set\Callnow regenerate the value when shrinking
Innmind\BlackBox\Set\Call
Innmind\BlackBox\Set\NullableInnmind\BlackBox\Set::map()Innmind\BlackBox\PHPUnit\ExtensionInnmind\BlackBox\ApplicationInnmind\BlackBox\TagInnmind\BlackBox\Runner\LoadInnmind\BlackBox\Runner\CodeCoverageInnmind\BlackBox\Runner\AssertInnmind\BlackBox\Runner\PrinterInnmind\BlackBox\Runner\IOInnmind\BlackBox\Property::any()
- All
Sets constructor are now private - PHP
8.2is now required Innmind\BlackBox\Set\AnyTypehas been renamed toInnmind\BlackBox\Set\TypeInnmind\BlackBox\Randomis now an enum- Requires
PHPUnit10 Innmind\BlackBox\Propertiesconstructor is now private, use::of()named constructor insteadInnmind\BlackBox\Properties::ensureHeldBynow expectsInnmind\BlackBox\Runner\Assertas a first argumentInnmind\BlackBox\Propertiesis now longer compatible with third party test runnersInnmind\BlackBox\Property::ensureHeldBynow expectsInnmind\BlackBox\Runner\Assertas a first argumentInnmind\BlackBox\Propertyis now longer compatible with third party test runnersInnmind\BlackBox\Set::take()and::filter()now explicitly state that they are mutation freeInnmind\BlackBox\Set::take()now requires apositive-intas argumentInnmind\BlackBox\Set\Charsnow longer implements theSetinterface, useChars::any()insteadInnmind\BlackBox\Set\IntegersExceptZeronow longer implements theSetinterface, useIntegersExceptZero::any()insteadInnmind\BlackBox\Set\NaturalNumbersnow longer implements theSetinterface, useNaturalNumbers::any()insteadInnmind\BlackBox\Set\NaturalNumbersExceptZeronow longer implements theSetinterface, useNaturalNumbersExceptZero::any()insteadInnmind\BlackBox\Set\Sequence::of()now longer accept the range of values as 2nd argument, useSequence::of()->atLeast(),Sequence::of()->atMost()andSequence::of()->between()insteadInnmind\BlackBox\Set\Stringsnow longer implements theSetinterface, useStrings::any()insteadInnmind\BlackBox\Set\Strings::any()now longer accept the maximum length, useStrings::atMost()instead
- Avoid trying to generate from a
SetinSet\Eitherthat can't generate data
seedermethod provided byInnmind\BlackBox\PHPUnit\Blackboxtrait- Support for PHPUnit
8and9(custom printers are now longer available) - Support for Symfony
4and5 Innmind\BlackBox\Set\RegexInnmind\BlackBox\Set\Strings::matching()Innmind\BlackBox\Random\RandomIntInnmind\BlackBox\Random\MtRandInnmind\BlackBox\Property::name()Innmind\BlackBox\PHPUnit\BlackBox::seeder()Innmind\BlackBox\PHPUnit\SeederInnmind\BlackBox\Set\Properties::chooseFrom(), useProperties::any()->between()orProperties::any()->atMost()insteadInnmind\BlackBox\Set\PropertyInnmind\BlackBox\Set\Unicode::lengthBetween(), useUnicode::any()->between()instead