import(__DIR__ . '/phpunit-exception.php'); $services = $containerConfigurator->services(); $services->set(RenameMethodRector::class) ->call('configure', [[ RenameMethodRector::METHOD_CALL_RENAMES => inline_value_objects([ new MethodCallRename('PHPUnit\Framework\TestCase', 'createMockBuilder', 'getMockBuilder'), ]), ]]); $services->set(RenameClassRector::class) ->call('configure', [[ RenameClassRector::OLD_TO_NEW_CLASSES => [ 'PHPUnit_Framework_MockObject_Stub' => 'PHPUnit\Framework\MockObject\Stub', 'PHPUnit_Framework_MockObject_Stub_Return' => 'PHPUnit\Framework\MockObject\Stub\ReturnStub', 'PHPUnit_Framework_MockObject_Matcher_Parameters' => 'PHPUnit\Framework\MockObject\Matcher\Parameters', 'PHPUnit_Framework_MockObject_Matcher_Invocation' => 'PHPUnit\Framework\MockObject\Matcher\Invocation', 'PHPUnit_Framework_MockObject_MockObject' => 'PHPUnit\Framework\MockObject\MockObject', 'PHPUnit_Framework_MockObject_Invocation_Object' => 'PHPUnit\Framework\MockObject\Invocation\ObjectInvocation', ], ]]); $services->set(PseudoNamespaceToNamespaceRector::class) ->call('configure', [[ // ref. https://github.com/sebastianbergmann/phpunit/compare/5.7.9...6.0.0 PseudoNamespaceToNamespaceRector::NAMESPACE_PREFIXES_WITH_EXCLUDED_CLASSES => inline_value_objects( [new PseudoNamespaceToNamespace('PHPUnit_', [ 'PHPUnit_Framework_MockObject_MockObject', 'PHPUnit_Framework_MockObject_Invocation_Object', 'PHPUnit_Framework_MockObject_Matcher_Invocation', 'PHPUnit_Framework_MockObject_Matcher_Parameters', 'PHPUnit_Framework_MockObject_Stub_Return', 'PHPUnit_Framework_MockObject_Stub', ])] ), ]]); $services->set(AddDoesNotPerformAssertionToNonAssertingTestRector::class); $services->set(GetMockBuilderGetMockToCreateMockRector::class); };