public function reset()
    {
        foreach (array_keys($this->objectInstances) as $className) {
            if ($className !== self::class) {
                unset($this->objectInstances[$className]);
            }
        }
    }
public function reset()
    {
        foreach (array_keys($this->objectInstances) as $className) {
            if ($className !== self::class) {
                unset($this->objectInstances[$className]);
            }
        }
    }
public function reset ( ) { foreach ( array_keys ( $ this -> objectInstances ) as $ className ) { if ( $ className !== self :: class ) { unset ( $ this -> objectInstances [ $ className ] ) ; } } }
Used in unit tests.
Used in unit tests .