]> git.mxchange.org Git - friendica-addons.git/blobdiff - twitter/vendor/abraham/twitteroauth/tests/TokenTest.php
Merge branch '3.6-rc'
[friendica-addons.git] / twitter / vendor / abraham / twitteroauth / tests / TokenTest.php
diff --git a/twitter/vendor/abraham/twitteroauth/tests/TokenTest.php b/twitter/vendor/abraham/twitteroauth/tests/TokenTest.php
new file mode 100644 (file)
index 0000000..5be372b
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+namespace Abraham\TwitterOAuth\Tests;
+
+use Abraham\TwitterOAuth\Token;
+
+class TokenTest extends \PHPUnit_Framework_TestCase {
+    /**
+     * @dataProvider tokenProvider
+     */
+    public function testToString($expected, $key, $secret)
+    {
+        $token = new Token($key, $secret);
+
+        $this->assertEquals($expected, $token->__toString());
+    }
+
+    public function tokenProvider()
+    {
+        return [
+            ['oauth_token=key&oauth_token_secret=secret', 'key', 'secret'],
+            ['oauth_token=key%2Bkey&oauth_token_secret=secret', 'key+key', 'secret'],
+            ['oauth_token=key~key&oauth_token_secret=secret', 'key~key', 'secret'],
+        ];
+    }
+}
\ No newline at end of file