Browse Source

update instagram test data

pull/87/head
Aaron Parecki 6 years ago
parent
commit
8fe9b70526
No known key found for this signature in database GPG Key ID: 276C2817346D6056
18 changed files with 2850 additions and 1252 deletions
  1. +21
    -21
      tests/InstagramTest.php
  2. +196
    -81
      tests/data/www.instagram.com/aaronpk_
  3. +189
    -80
      tests/data/www.instagram.com/explore_locations_109284789535230_
  4. +192
    -83
      tests/data/www.instagram.com/explore_locations_359000003_
  5. +214
    -95
      tests/data/www.instagram.com/indiewebcat_
  6. +217
    -98
      tests/data/www.instagram.com/kmikeym_
  7. +216
    -97
      tests/data/www.instagram.com/microformats_
  8. +192
    -80
      tests/data/www.instagram.com/p_BGDpqNoiMJ0_
  9. +190
    -78
      tests/data/www.instagram.com/p_BN3Z5salSys_
  10. +191
    -79
      tests/data/www.instagram.com/p_BNfqVfVlmkj_
  11. +193
    -81
      tests/data/www.instagram.com/p_BO5rYVElvJq_
  12. +195
    -83
      tests/data/www.instagram.com/p_BO_RN8AFZSx_
  13. +192
    -80
      tests/data/www.instagram.com/p_BZWmUB_DVtp_
  14. +192
    -80
      tests/data/www.instagram.com/p_BZWmpecjBwN_
  15. +20
    -20
      tests/data/www.instagram.com/p_BsdjKytBZyx_
  16. +19
    -19
      tests/data/www.instagram.com/p_BsdlOmLh_IX_
  17. +216
    -97
      tests/data/www.instagram.com/pk_spam_
  18. +5
    -0
      tests/download-instagram-data.sh

+ 21
- 21
tests/InstagramTest.php View File

@ -36,10 +36,10 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this->assertContains('2017', $data['data']['category']);
$this->assertEquals('Kind of crazy to see the whole year laid out like this. #planning #2017', $data['data']['content']['text']);
$this->assertEquals(1, count($data['data']['photo']));
$this->assertEquals(['https://instagram.fsea1-1.fna.fbcdn.net/vp/214e719b6026ef54e0545f2ed70d4c83/5B56795F/t51.2885-15/e35/15803256_1832278043695907_4846092951052353536_n.jpg'], $data['data']['photo']);
$this->assertEquals(['https://instagram.fsjc1-3.fna.fbcdn.net/vp/af9471f885e6197478d71807a7cbf297/5CBA6E5F/t51.2885-15/e35/15803256_1832278043695907_4846092951052353536_n.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net'], $data['data']['photo']);
$this->assertEquals('https://aaronparecki.com/', $data['data']['author']['url']);
$this->assertEquals('Aaron Parecki', $data['data']['author']['name']);
$this->assertEquals('https://instagram.fsea1-1.fna.fbcdn.net/vp/0dc6166cbd4ec6782453d36cd07fec06/5B67568E/t51.2885-19/s320x320/14240576_268350536897085_1129715662_a.jpg', $data['data']['author']['photo']);
$this->assertEquals('https://instagram.fsjc1-3.fna.fbcdn.net/vp/45aee453740a714bf408f8947f89da8e/5CCB4B8E/t51.2885-19/s320x320/14240576_268350536897085_1129715662_a.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net', $data['data']['author']['photo']);
}
public function testBGDpqNoiMJ0() {
@ -60,7 +60,7 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
'type' => 'card',
'name' => 'pk_spam',
'url' => 'https://aaronparecki.com/',
'photo' => 'https://instagram.fhel2-1.fna.fbcdn.net/vp/f17e1275a70fc32e93cbf434ddc32bcd/5B6CCC7A/t51.2885-19/11906329_960233084022564_1448528159_a.jpg',
'photo' => 'https://scontent-frx5-1.cdninstagram.com/vp/74112f515c64726429c69fedcb927c2d/5CB64CF1/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=scontent-frx5-1.cdninstagram.com',
'note' => 'My website is https://aaronparecki.com.dev/ and http://aaronpk.micro.blog/about/ and https://tiny.xyz.dev/'
], $data['data']['author']);
@ -79,8 +79,8 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
'type' => 'card',
'name' => 'Burnside 26',
'url' => 'https://www.instagram.com/explore/locations/359000003/',
'latitude' => 45.5228640678,
'longitude' => -122.6389405085
'latitude' => 45.52322,
'longitude' => -122.63885
], $data['data']['refs']['https://www.instagram.com/explore/locations/359000003/']);
}
@ -101,12 +101,12 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this->assertContains('100daysofmusic', $data['data']['category']);
$this->assertEquals('Day 18. Maple and Spruce #100daysofmusic #100daysproject #the100dayproject https://aaronparecki.com/2017/01/07/14/day18', $data['data']['content']['text']);
$this->assertEquals(1, count($data['data']['photo']));
$this->assertEquals(['https://instagram.fsea1-1.fna.fbcdn.net/vp/32890db04701c4ab4fa7da05a6e9de93/5ADB9BDF/t51.2885-15/e15/15624670_548881701986735_8264383763249627136_n.jpg'], $data['data']['photo']);
$this->assertEquals(['https://instagram.fsjc1-3.fna.fbcdn.net/vp/a77f8672f977413d2eb5239cd6d5c4cf/5C3A4ADF/t51.2885-15/e15/15624670_548881701986735_8264383763249627136_n.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net'], $data['data']['photo']);
$this->assertEquals(1, count($data['data']['video']));
$this->assertEquals(['https://instagram.fsea1-1.fna.fbcdn.net/vp/46c7118509146b978fb7bfc497eeb16f/5ADB639E/t50.2886-16/15921147_1074837002642259_2269307616507199488_n.mp4'], $data['data']['video']);
$this->assertEquals(['https://instagram.fsjc1-3.fna.fbcdn.net/vp/90ed8fe576cba16e258c0f4cfc05299a/5C3A129E/t50.2886-16/15921147_1074837002642259_2269307616507199488_n.mp4?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net'], $data['data']['video']);
$this->assertEquals('https://aaronparecki.com/', $data['data']['author']['url']);
$this->assertEquals('Aaron Parecki', $data['data']['author']['name']);
$this->assertEquals('https://instagram.fsea1-1.fna.fbcdn.net/vp/0dc6166cbd4ec6782453d36cd07fec06/5B67568E/t51.2885-19/s320x320/14240576_268350536897085_1129715662_a.jpg', $data['data']['author']['photo']);
$this->assertEquals('https://instagram.fsjc1-3.fna.fbcdn.net/vp/45aee453740a714bf408f8947f89da8e/5CCB4B8E/t51.2885-19/s320x320/14240576_268350536897085_1129715662_a.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net', $data['data']['author']['photo']);
}
public function testInstagramPhotoWithPersonTag() {
@ -122,9 +122,9 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('instagram', $data['source-format']);
$this->assertEquals(2, count($data['data']['category']));
$this->assertContains('http://www.kmikeym.com/', $data['data']['category']);
$this->assertArrayHasKey('http://www.kmikeym.com/', $data['data']['refs']);
$this->assertEquals(['type'=>'card','name'=>'Mike Merrill','url'=>'http://www.kmikeym.com/','photo'=>'https://instagram.fsea1-1.fna.fbcdn.net/vp/dea521b3000a53d2d9a6845f5b066256/5B66D2FC/t51.2885-19/s320x320/20634957_814691788710973_2275383796935163904_a.jpg','note'=>'The world’s first Publicly Traded Person and working on things at @sandwichvideo'], $data['data']['refs']['http://www.kmikeym.com/']);
$this->assertEquals(['type'=>'card','name'=>'KmikeyM™️','url'=>'https://kmikeym.com/','photo'=>'https://instagram.fsjc1-3.fna.fbcdn.net/vp/ea5b988b616dbcc778b3013bf2426d70/5CCAC7FC/t51.2885-19/s320x320/20634957_814691788710973_2275383796935163904_a.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net','note'=>"The world’s first publicly traded person.\n\nAcct in collaboration with @norbertoinc\n\nBecome a shareholder today!\n"], $data['data']['refs']['https://kmikeym.com/']);
$this->assertContains('https://kmikeym.com/', $data['data']['category']);
$this->assertArrayHasKey('https://kmikeym.com/', $data['data']['refs']);
}
public function testInstagramPhotoWithVenue() {
@ -163,8 +163,8 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('instagram', $data['source-format']);
$this->assertEquals(2, count($data['data']['photo']));
$this->assertEquals('https://instagram.fsea1-1.fna.fbcdn.net/vp/406101ff9601ab78147e121b65ce3eea/5B5BC738/t51.2885-15/e35/21827424_134752690591737_8093088291252862976_n.jpg', $data['data']['photo'][0]);
$this->assertEquals('https://instagram.fsea1-1.fna.fbcdn.net/vp/03ddc8c03c8708439dae29663b8c2305/5B5EDE4D/t51.2885-15/e35/21909774_347707439021016_5237540582556958720_n.jpg', $data['data']['photo'][1]);
$this->assertEquals('https://instagram.fsjc1-3.fna.fbcdn.net/vp/6b09c3d5490ee3efb55849858a9ec014/5CBFBC38/t51.2885-15/e35/21827424_134752690591737_8093088291252862976_n.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net', $data['data']['photo'][0]);
$this->assertEquals('https://instagram.fsjc1-3.fna.fbcdn.net/vp/8b1b2e6efa86a4856ec37a60f0fa77f5/5CC2D34D/t51.2885-15/e35/21909774_347707439021016_5237540582556958720_n.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net', $data['data']['photo'][1]);
$this->assertArrayNotHasKey('video', $data['data']);
$this->assertEquals(2, count($data['data']['category']));
}
@ -183,9 +183,9 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('photo', $data['data']['post-type']); // we discard videos in this case right now
$this->assertEquals(3, count($data['data']['photo']));
$this->assertEquals('https://instagram.fsea1-1.fna.fbcdn.net/vp/b0f6cd9dc4d5c3371efe9f412a0d7f0b/5B6BC5B8/t51.2885-15/e35/21878922_686481254874005_8468823712617988096_n.jpg', $data['data']['photo'][0]);
$this->assertEquals('https://instagram.fsea1-1.fna.fbcdn.net/vp/f8939cca504f97931fd4768b77d2c152/5ADB3CC9/t51.2885-15/e15/21910026_1507234999368159_6974261907783942144_n.jpg', $data['data']['photo'][1]);
$this->assertEquals('https://instagram.fsea1-1.fna.fbcdn.net/vp/254c313bdcac37c19da5e10be8222a88/5B689788/t51.2885-15/e35/21878800_273567963151023_7672178549897297920_n.jpg', $data['data']['photo'][2]);
$this->assertEquals('https://instagram.fsjc1-3.fna.fbcdn.net/vp/ee1a28763918069f3e54dad35be24ad8/5CCFBAB8/t51.2885-15/e35/21878922_686481254874005_8468823712617988096_n.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net', $data['data']['photo'][0]);
$this->assertEquals('https://instagram.fsjc1-3.fna.fbcdn.net/vp/ddc0ebe969bb1f9e6bf8adada0892c90/5C39EBC9/t51.2885-15/e15/21910026_1507234999368159_6974261907783942144_n.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net', $data['data']['photo'][1]);
$this->assertEquals('https://instagram.fsjc1-3.fna.fbcdn.net/vp/bfe032af795427443ea448840df1c3a4/5CCC8C88/t51.2885-15/e35/21878800_273567963151023_7672178549897297920_n.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net', $data['data']['photo'][2]);
$this->assertArrayNotHasKey('video', $data['data']);
$this->assertEquals(2, count($data['data']['category']));
}
@ -205,8 +205,8 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
'type' => 'card',
'name' => 'Aaron Parecki',
'url' => 'https://aaronparecki.com/',
'photo' => 'https://instagram.fsea1-1.fna.fbcdn.net/vp/0dc6166cbd4ec6782453d36cd07fec06/5B67568E/t51.2885-19/s320x320/14240576_268350536897085_1129715662_a.jpg',
'note' => '📡 w7apk.com 🔒 oauth.net 🎥 backpedal.tv 🎙 streampdx.com'
'photo' => 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/45aee453740a714bf408f8947f89da8e/5CCB4B8E/t51.2885-19/s320x320/14240576_268350536897085_1129715662_a.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net',
'note' => '🔒 oauth.net 🎥 backpedal.tv 🎙 streampdx.com 📡 w7apk.com'
], $data['data']);
}
@ -225,7 +225,7 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
'type' => 'card',
'name' => 'pk_spam',
'url' => 'https://aaronparecki.com/',
'photo' => 'https://instagram.fhel2-1.fna.fbcdn.net/vp/f17e1275a70fc32e93cbf434ddc32bcd/5B6CCC7A/t51.2885-19/11906329_960233084022564_1448528159_a.jpg',
'photo' => 'https://scontent-frx5-1.cdninstagram.com/vp/74112f515c64726429c69fedcb927c2d/5CB64CF1/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=scontent-frx5-1.cdninstagram.com',
'note' => 'My website is https://aaronparecki.com.dev/ and http://aaronpk.micro.blog/about/ and https://tiny.xyz.dev/'
], $data['data']);
}
@ -243,8 +243,8 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('feed', $data['data']['type']);
$this->assertEquals(12, count($data['data']['items']));
$this->assertEquals('https://www.instagram.com/p/Be0lBpGDncI/', $data['data']['items'][0]['url']);
$this->assertEquals('https://www.instagram.com/p/BGC8l_ZCMKb/', $data['data']['items'][11]['url']);
$this->assertEquals('https://www.instagram.com/p/BsdlOmLh_IX/', $data['data']['items'][0]['url']);
$this->assertEquals('https://www.instagram.com/p/BGFdtAViMJy/', $data['data']['items'][11]['url']);
}
public function testInstagramPhotoWithAltText() {

+ 196
- 81
tests/data/www.instagram.com/aaronpk_
File diff suppressed because it is too large
View File


+ 189
- 80
tests/data/www.instagram.com/explore_locations_109284789535230_
File diff suppressed because it is too large
View File


+ 192
- 83
tests/data/www.instagram.com/explore_locations_359000003_
File diff suppressed because it is too large
View File


+ 214
- 95
tests/data/www.instagram.com/indiewebcat_
File diff suppressed because it is too large
View File


+ 217
- 98
tests/data/www.instagram.com/kmikeym_
File diff suppressed because it is too large
View File


+ 216
- 97
tests/data/www.instagram.com/microformats_
File diff suppressed because it is too large
View File


+ 192
- 80
tests/data/www.instagram.com/p_BGDpqNoiMJ0_
File diff suppressed because it is too large
View File


+ 190
- 78
tests/data/www.instagram.com/p_BN3Z5salSys_
File diff suppressed because it is too large
View File


+ 191
- 79
tests/data/www.instagram.com/p_BNfqVfVlmkj_
File diff suppressed because it is too large
View File


+ 193
- 81
tests/data/www.instagram.com/p_BO5rYVElvJq_
File diff suppressed because it is too large
View File


+ 195
- 83
tests/data/www.instagram.com/p_BO_RN8AFZSx_
File diff suppressed because it is too large
View File


+ 192
- 80
tests/data/www.instagram.com/p_BZWmUB_DVtp_
File diff suppressed because it is too large
View File


+ 192
- 80
tests/data/www.instagram.com/p_BZWmpecjBwN_
File diff suppressed because it is too large
View File


+ 20
- 20
tests/data/www.instagram.com/p_BsdjKytBZyx_
File diff suppressed because it is too large
View File


+ 19
- 19
tests/data/www.instagram.com/p_BsdlOmLh_IX_
File diff suppressed because it is too large
View File


+ 216
- 97
tests/data/www.instagram.com/pk_spam_
File diff suppressed because it is too large
View File


+ 5
- 0
tests/download-instagram-data.sh View File

@ -2,6 +2,10 @@
urls=(
'https://www.instagram.com/aaronpk/'
'https://www.instagram.com/indiewebcat/'
'https://www.instagram.com/kmikeym/'
'https://www.instagram.com/microformats/'
'https://www.instagram.com/pk_spam/'
'https://www.instagram.com/p/BO5rYVElvJq/'
'https://www.instagram.com/p/BGDpqNoiMJ0/'
'https://www.instagram.com/p/BO_RN8AFZSx/'
@ -20,5 +24,6 @@ for url in ${urls[@]}; do
echo "$url > $fn"
curl -i -s $url > data/www.instagram.com/$fn
unix2dos data/www.instagram.com/$fn
sleep 2
done

Loading…
Cancel
Save