summaryrefslogtreecommitdiff
path: root/vendor/eher/oauth/test/Eher/OAuth/RequestTest.php
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-03-01 19:32:52 -0600
committerChristian Cleberg <[email protected]>2026-03-01 19:32:52 -0600
commita98c2a4542e19ce4fb632bc32fc47c18273161cc (patch)
tree99d016c1c9f12d98d57cfec34262e7c228a1d920 /vendor/eher/oauth/test/Eher/OAuth/RequestTest.php
parentcd8c38db601355003510e92a0936cde6b71cf849 (diff)
downloadmichelangelo-a98c2a4542e19ce4fb632bc32fc47c18273161cc.tar.gz
michelangelo-a98c2a4542e19ce4fb632bc32fc47c18273161cc.tar.bz2
michelangelo-a98c2a4542e19ce4fb632bc32fc47c18273161cc.zip
convert from PHP to Go
Diffstat (limited to 'vendor/eher/oauth/test/Eher/OAuth/RequestTest.php')
-rw-r--r--vendor/eher/oauth/test/Eher/OAuth/RequestTest.php40
1 files changed, 0 insertions, 40 deletions
diff --git a/vendor/eher/oauth/test/Eher/OAuth/RequestTest.php b/vendor/eher/oauth/test/Eher/OAuth/RequestTest.php
deleted file mode 100644
index 4551695..0000000
--- a/vendor/eher/oauth/test/Eher/OAuth/RequestTest.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-namespace Eher\OAuth;
-
-class RequestTest extends \PHPUnit_Framework_TestCase
-{
- public function testRequestToUrl()
- {
- $consumer = null;
- $signatureMethod = null;
- $request = null;
- $once = "";
- $timestamp = "";
- $signature = "";
- $expectedUrl = "";
-
- $consumer = new Consumer('ConsumerKey', 'ConsumerSecret');
- $signatureMethod = new HmacSha1();
- $request = Request::from_consumer_and_token(
- $consumer,
- null,
- "GET",
- "http://www.endpoint.url/",
- array()
- );
- $request->sign_request($signatureMethod, $consumer, null);
-
- $once = $request->get_parameter('oauth_nonce');
- $timestamp = $request->get_parameter('oauth_timestamp');
- $signature = $request->get_parameter('oauth_signature');
- $expectedUrl = "http://www.endpoint.url/?"
- . "oauth_consumer_key=ConsumerKey"
- . "&oauth_nonce=" . $once
- . "&oauth_signature=" . Util::urlencode_rfc3986($signature)
- . "&oauth_signature_method=HMAC-SHA1"
- . "&oauth_timestamp=" . $timestamp
- . "&oauth_version=1.0";
- $this->assertEquals( $expectedUrl, (string) $request);
- }
-}