ZF-6072: $_singleInstances are not cleaned up with namespaceUnset()

Description

This is in my bootstrap (among other things):


class App
{
  public function __construct($env)
  {
  }

  public function start()
  {
    $foo = new Zend_Session_Namespace('foo', true);
    Zend_Registry::set('foo', $foo);
  }
}

My test case:


public function setUp()
{
  $boostrap = new App('testing');
  $this->bootstrap = array($bootstrap, 'start');
}

public function testIfIhaveLostMyFckingMind()
{
  // whatever here
}

public function testOHaiKthxBai()
{
  // something else
}

After I ran my test, {{Zend_Session::namespaceIsset('foo')}} reports "false" (test in {{tearDown()}} etc.) -- so there should be no issue re-creating (= re-calling the bootstrap). But there is. Imho, the fix would be that {{Zend_Session::namespaceUnset()}} also cleans up in {{$_singleInstances}}.

This is the exception I get when it enters {{testOHaiKthxBai()}}: {quote} Zend_Session_Exception: A session namespace object already exists for this namespace ('foo'), and no additional accessors (session namespace objects) for this namespace are permitted. {quote}

Comments

Fixed in r15641