in_array
function (#830)andAnyOtherArgs
as an optional argument matcher (#860)__destruct
) are stubbed out where it makes sensewithArgs()
to validate multiple arguments at once.Mockery\Adapter\Phpunit\TestListener
has been rewritten because it
incorrectly marked some tests as risky. It will no longer verify mock
expectations but instead check that tests do that themselves. PHPUnit 6 is
required if you want to use this fail safe.andThrow
will now throw anything \Throwable
allows
and expects
syntaxmock
, namedMock
and spy
Mockery\Matcher\MustBe
was deprecatedMockery\MockInterface
as internalnull
by default from ignored (non-mocked) methods with nullable return type\Mockery::pattern()
when regex matching is needed$e->dismiss()
to dismiss.shouldIgnoreMissing
will respect global allowMockingNonExistentMethods
configshouldIgnoreMissing
call on control instanceMockery\Adapter\Phpunit\MockeryPHPUnitIntegration
traitmakePartial
to Mockery\MockInterface
as it was missingMockery\Adapter\Phpunit\MockeryTestCase
for more reliable PHPUnit
integrationandThrowExceptions
Mockery\Configuration::allowMockingNonExistentMethods(false)
with
Mockery\MockInterface::shouldAllowMockingMethod($methodName)
$mock->shouldReceive("foo")->andReturnSelf()
shouldIgnoreMissing
now takes an optional value that will be return instead
of null, e.g. $mock->shouldIgnoreMissing($mock)
byDefault
shouldAllowMockingProtectedMethods