static function test10() { require '../OauthPanda.class.php'; $foo = new OauthPanda(array('exception_handling' => 'throw', 'request_client' => new YahooCurlWrapper('../YahooCurl.class.php'), 'oauth_client' => new StandardOauthWrapper('../OAuth.php'), 'consumer_key' => YAHOO_OAUTH_CONSUMER_KEY, 'consumer_secret' => YAHOO_OAUTH_CONSUMER_SECRET)); try { $foo->BAR(array('url' => 'https://api.login.yahoo.com/oauth/v2/get_request_token')); TestUtils::assertTrue(false, 'invalid request method should throw exception'); } catch (Exception $e) { TestUtils::assertTrue(false !== strpos($e->getMessage(), '<i>request_method</i> must be "GET" or "POST", not "BAR"')); } }