src/Factory.php
public function addInstance($className, $mockObject)
    {
        if(!isset($this->objects[$className])) {
            $this->objects[$className] = [];
        }
        $this->objects[$className][] = $mockObject;
    }
public function addInstance($className, $mockObject)
    {
        if(!isset($this->objects[$className])) {
            $this->objects[$className] = [];
        }
        $this->objects[$className][] = $mockObject;
    }
Add an instance of a class. This will be returned when the user tries to create a the object

@param string $className  The class to create
@param string $mockObject The class to create