public function testSessionGetsProvider() { Session::setDefaultSessionProviderClassName("Rhubarb\\Crown\\Tests\\Sessions\\UnitTestingSessionProvider"); $session = new UnitTestingSession(); $this->assertInstanceOf("Rhubarb\\Crown\\Tests\\Sessions\\UnitTestingSessionProvider", $session->testGetSessionProvider()); Session::setDefaultSessionProviderClassName("Rhubarb\\Crown\\Sessions\\SessionProviders\\PhpSessionProvider"); // Although we have changed the default provider, we already instantiated the session so the provider will not // have changed $this->assertInstanceOf("Rhubarb\\Crown\\Tests\\Sessions\\UnitTestingSessionProvider", $session->testGetSessionProvider()); }