src/MockableSingletonBehavior.php
public static function registerSingletonInstance($instance)
    {
        self::verifyInstanceNotYetRegistered();
        self::verifyInstanceType($instance);
        self::$instance = $instance;
    }
public static function registerSingletonInstance($instance)
    {
        self::verifyInstanceNotYetRegistered();
        self::verifyInstanceType($instance);
        self::$instance = $instance;
    }
public static function registerSingletonInstance ( $ instance ) { self :: verifyInstanceNotYetRegistered ( ) ; self :: verifyInstanceType ( $ instance ) ; self :: $ instance = $ instance ; }
Registers a specific instance of the class to use as the singleton instance

@param  static $instance  the instance to register as the singleton instance
@throws \TypeError if the given instance argument does not match the type of the context object
@throws \RuntimeException if an instance has already been registered
Registers a specific instance of the class to use as the singleton instance