/** * @expectedException ObjectStorage_Exception_Http_Unauthorized */ public function testAuthenticationWithBadCredentials() { $options = array('adapter' => ObjectStorage_Http_Client::SOCKET, 'timeout' => 10); $objectStorage = new ObjectStorage(self::$host, self::$username, 'bad-password-' . time(), $options); // Make sure we are not using cached auth data ObjectStorage::setTokenStore(new AuthenticationTest_TokenStore()); $authData = $objectStorage->getAuthenticationData(); }