src/Facade/FacadeTrait.php
public static function partialMock(
        $types = [],
        $arguments = []
    ): InstanceHandle {
        $container = self::$globals::$container;

        return $container->handleFactory->instanceHandle(
            $container->mockBuilderFactory->create($types)
                ->partialWith($arguments)
        );
    }
public static function partialMock(
        $types = [],
        $arguments = []
    ): InstanceHandle {
        $container = self::$globals::$container;

        return $container->handleFactory->instanceHandle(
            $container->mockBuilderFactory->create($types)
                ->partialWith($arguments)
        );
    }
public static function partialMock ( $ types = [ ] , $ arguments = [ ] ) : InstanceHandle { $ container = self :: $ globals :: $ container ; return $ container -> handleFactory -> instanceHandle ( $ container -> mockBuilderFactory -> create ( $ types ) -> partialWith ( $ arguments ) ) ; }
Create a new partial mock, and return a handle.

Each value in `$types` can be either a class name, or an ad hoc mock
definition. If only a single type is being mocked, the class name or
definition can be passed without being wrapped in an array.

Omitting `$arguments` will cause the original constructor to be called
with an empty argument list. However, if a `null` value is supplied for
`$arguments`, the original constructor will not be called at all.

@param mixed                $types     The types to mock.
@param Arguments|array|null $arguments The constructor arguments, or null to bypass the constructor.

@return InstanceHandle A handle around the new mock.
Create a new partial mock and return a handle .