From 8c325943742b69e97f4a52686fb13304f983cb7e Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Fri, 5 Feb 2016 19:37:53 -0800 Subject: [PATCH] replace test data with an actual Superfeedr payload --- tests/APITest.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/APITest.php b/tests/APITest.php index 8e903b5..f0f562a 100644 --- a/tests/APITest.php +++ b/tests/APITest.php @@ -255,11 +255,7 @@ class APITest extends PHPUnit_Framework_TestCase { public function testSuperfeedrTracker() { $this->_createExampleAccount(); - $payload = [ - 'items' => [[ - 'permalinkUrl' => 'http://source.example.com/basictest' - ]] - ]; + $payload = json_decode('{"status":{"code":200,"http":"Track feed","nextFetch":1238466305,"period":900,"lastFetch":1238466305,"lastParse":1238466305,"lastMaintenanceAt":1238466305,"feed":"http:\/\/track.superfeedr.com\/?query=indieweb"},"title":"","updated":1454695477,"id":"","items":[{"id":"http:\/\/werd.io\/2016\/im-so-used-to-posting-on-my-own-site-first","published":1454690643,"updated":1454690643,"title":"I\'m so used to posting on my own site first and syndicating to Twitter and Facebook that I\'d find it so weird to post natively.","summary":"
\n

I'm so used to posting on my own site first and syndicating to Twitter and Facebook that I'd find it so weird to post natively. #indieweb<\/a><\/p>\n<\/div>","permalinkUrl":"http://source.example.com/basictest","standardLinks":{"alternate":[{"title":"I\'m so used to posting on my own site first and syndicating to Twitter and Facebook that I\'d find it so weird to post natively.","rel":"alternate","href":"http:\/\/werd.io\/2016\/im-so-used-to-posting-on-my-own-site-first","type":"text\/html"}]},"actor":{"displayName":"Ben Werdm\u00fcller","id":"ben-werdm-ller"},"categories":["#indieweb"],"source":{"id":"ben-werdm-ller-2016-2-5-18","title":"Ben Werdm\u00fcller","updated":1454695469,"permalinkUrl":"http:\/\/werd.io\/content\/all","standardLinks":{"alternate":[{"title":"Ben Werdm\u00fcller","rel":"alternate","href":"http:\/\/werd.io\/content\/all","type":"text\/html"}],"hub":[{"title":"","rel":"hub","href":"http:\/\/benwerd.superfeedr.com\/","type":"text\/html"}],"self":[{"title":"Ben Werdm\u00fcller","rel":"self","href":"http:\/\/werd.io\/content\/all?_t=rss","type":"application\/rss+xml"}]},"status":{"code":200,"http":"","nextFetch":1454776929,"lastFetch":1454695477,"lastParse":1454695477,"lastMaintenanceAt":1454627737,"period":86400,"velocity":10.5,"popularity":0.97363835294308,"bozoRank":0.1,"entriesCountSinceLastMaintenance":7,"feed":"http:\/\/werd.io\/content\/all?_t=rss"}}}]}', true); $response = $this->superfeedr_tracker($payload, ['token'=>'a']); $this->assertEquals(201, $response->getStatusCode());