@ -36,10 +36,10 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this -> assertContains ( '2017' , $data [ 'data' ][ 'category' ]);
$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 ( '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 ( 1 , count ( $data [ 'data' ][ 'photo' ]));
$this -> assertEquals ([ 'https://instagram.fsea1-1.fna.fbcdn.net/vp/214e719b6026ef54e0545f2ed70d4c83/5B5679 5F/t51.2885-15/e35/15803256_1832278043695907_4846092951052353536_n.jpg' ], $data [ 'data' ][ 'photo' ]);
$this -> assertEquals ([ 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/af9471f885e6197478d71807a7cbf297/5CBA6E 5F/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 ( 'https://aaronparecki.com/' , $data [ 'data' ][ 'author' ][ 'url' ]);
$this -> assertEquals ( 'Aaron Parecki' , $data [ 'data' ][ 'author' ][ 'name' ]);
$this -> assertEquals ( 'Aaron Parecki' , $data [ 'data' ][ 'author' ][ 'name' ]);
$this -> assertEquals ( 'https://instagram.fsea1-1.fna.fbcdn.net/vp/0dc6166cbd4ec6782453d36cd07fec06/5B6756 8E/t51.2885-19/s320x320/14240576_268350536897085_1129715662_a.jpg' , $data [ 'data' ][ 'author' ][ 'photo' ]);
$this -> assertEquals ( 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/45aee453740a714bf408f8947f89da8e/5CCB4B 8E/t51.2885-19/s320x320/14240576_268350536897085_1129715662_a.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net ' , $data [ 'data' ][ 'author' ][ 'photo' ]);
}
}
public function testBGDpqNoiMJ0 () {
public function testBGDpqNoiMJ0 () {
@ -60,7 +60,7 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
'type' => 'card' ,
'type' => 'card' ,
'name' => 'pk_spam' ,
'name' => 'pk_spam' ,
'url' => 'https://aaronparecki.com/' ,
'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/'
'note' => 'My website is https://aaronparecki.com.dev/ and http://aaronpk.micro.blog/about/ and https://tiny.xyz.dev/'
], $data [ 'data' ][ 'author' ]);
], $data [ 'data' ][ 'author' ]);
@ -79,8 +79,8 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
'type' => 'card' ,
'type' => 'card' ,
'name' => 'Burnside 26' ,
'name' => 'Burnside 26' ,
'url' => 'https://www.instagram.com/explore/locations/359000003/' ,
'url' => 'https://www.instagram.com/explore/locations/359000003/' ,
'latitude' => 45.5228640678 ,
'longitude' => - 122.63894050 85
'latitude' => 45.5232 2 ,
'longitude' => - 122.63885
], $data [ 'data' ][ 'refs' ][ 'https://www.instagram.com/explore/locations/359000003/' ]);
], $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 -> 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 ( '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 ( 1 , count ( $data [ 'data' ][ 'photo' ]));
$this -> assertEquals ([ 'https://instagram.fsea1-1.fna.fbcdn.net/vp/32890db04701c4ab4fa7da05a6e9de93/5ADB9B DF/t51.2885-15/e15/15624670_548881701986735_8264383763249627136_n.jpg' ], $data [ 'data' ][ 'photo' ]);
$this -> assertEquals ([ 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/a77f8672f977413d2eb5239cd6d5c4cf/5C3A4A DF/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 ( 1 , count ( $data [ 'data' ][ 'video' ]));
$this -> assertEquals ([ 'https://instagram.fsea1-1.fna.fbcdn.net/vp/46c7118509146b978fb7bfc497eeb16f/5ADB63 9E/t50.2886-16/15921147_1074837002642259_2269307616507199488_n.mp4' ], $data [ 'data' ][ 'video' ]);
$this -> assertEquals ([ 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/90ed8fe576cba16e258c0f4cfc05299a/5C3A12 9E/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 ( 'https://aaronparecki.com/' , $data [ 'data' ][ 'author' ][ 'url' ]);
$this -> assertEquals ( 'Aaron Parecki' , $data [ 'data' ][ 'author' ][ 'name' ]);
$this -> assertEquals ( 'Aaron Parecki' , $data [ 'data' ][ 'author' ][ 'name' ]);
$this -> assertEquals ( 'https://instagram.fsea1-1.fna.fbcdn.net/vp/0dc6166cbd4ec6782453d36cd07fec06/5B6756 8E/t51.2885-19/s320x320/14240576_268350536897085_1129715662_a.jpg' , $data [ 'data' ][ 'author' ][ 'photo' ]);
$this -> assertEquals ( 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/45aee453740a714bf408f8947f89da8e/5CCB4B 8E/t51.2885-19/s320x320/14240576_268350536897085_1129715662_a.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net ' , $data [ 'data' ][ 'author' ][ 'photo' ]);
}
}
public function testInstagramPhotoWithPersonTag () {
public function testInstagramPhotoWithPersonTag () {
@ -122,9 +122,9 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this -> assertEquals ( 'instagram' , $data [ 'source-format' ]);
$this -> assertEquals ( 'instagram' , $data [ 'source-format' ]);
$this -> assertEquals ( 2 , count ( $data [ 'data' ][ 'category' ]));
$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 • \n Acct in collaboration with @norbertoinc \n • \n Become 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 () {
public function testInstagramPhotoWithVenue () {
@ -163,8 +163,8 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this -> assertEquals ( 'instagram' , $data [ 'source-format' ]);
$this -> assertEquals ( 'instagram' , $data [ 'source-format' ]);
$this -> assertEquals ( 2 , count ( $data [ 'data' ][ 'photo' ]));
$this -> assertEquals ( 2 , count ( $data [ 'data' ][ 'photo' ]));
$this -> assertEquals ( 'https://instagram.fsea1-1.fna.fbcdn.net/vp/406101ff9601ab78147e121b65ce3eea/5B5BC7 38/t51.2885-15/e35/21827424_134752690591737_8093088291252862976_n.jpg' , $data [ 'data' ][ 'photo' ][ 0 ]);
$this -> assertEquals ( 'https://instagram.fsea1-1.fna.fbcdn.net/vp/03ddc8c03c8708439dae29663b8c2305/5B5EDE 4D/t51.2885-15/e35/21909774_347707439021016_5237540582556958720_n.jpg' , $data [ 'data' ][ 'photo' ][ 1 ]);
$this -> assertEquals ( 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/6b09c3d5490ee3efb55849858a9ec014/5CBFBC 38/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/5CC2D3 4D/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 -> assertArrayNotHasKey ( 'video' , $data [ 'data' ]);
$this -> assertEquals ( 2 , count ( $data [ 'data' ][ 'category' ]));
$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 ( 'photo' , $data [ 'data' ][ 'post-type' ]); // we discard videos in this case right now
$this -> assertEquals ( 3 , count ( $data [ 'data' ][ 'photo' ]));
$this -> assertEquals ( 3 , count ( $data [ 'data' ][ 'photo' ]));
$this -> assertEquals ( 'https://instagram.fsea1-1.fna.fbcdn.net/vp/b0f6cd9dc4d5c3371efe9f412a0d7f0b/5B6BC5 B8/t51.2885-15/e35/21878922_686481254874005_8468823712617988096_n.jpg' , $data [ 'data' ][ 'photo' ][ 0 ]);
$this -> assertEquals ( 'https://instagram.fsea1-1.fna.fbcdn.net/vp/f8939cca504f97931fd4768b77d2c152/5ADB3C C9/t51.2885-15/e15/21910026_1507234999368159_6974261907783942144_n.jpg' , $data [ 'data' ][ 'photo' ][ 1 ]);
$this -> assertEquals ( 'https://instagram.fsea1-1.fna.fbcdn.net/vp/254c313bdcac37c19da5e10be8222a88/5B6897 88/t51.2885-15/e35/21878800_273567963151023_7672178549897297920_n.jpg' , $data [ 'data' ][ 'photo' ][ 2 ]);
$this -> assertEquals ( 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/ee1a28763918069f3e54dad35be24ad8/5CCFBA B8/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/5C39EB C9/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/5CCC8C 88/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 -> assertArrayNotHasKey ( 'video' , $data [ 'data' ]);
$this -> assertEquals ( 2 , count ( $data [ 'data' ][ 'category' ]));
$this -> assertEquals ( 2 , count ( $data [ 'data' ][ 'category' ]));
}
}
@ -205,8 +205,8 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
'type' => 'card' ,
'type' => 'card' ,
'name' => 'Aaron Parecki' ,
'name' => 'Aaron Parecki' ,
'url' => 'https://aaronparecki.com/' ,
'url' => 'https://aaronparecki.com/' ,
'photo' => 'https://instagram.fsea1-1.fna.fbcdn.net/vp/0dc6166cbd4ec6782453d36cd07fec06/5B6756 8E/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/5CCB4B 8E/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' ]);
], $data [ 'data' ]);
}
}
@ -225,7 +225,7 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
'type' => 'card' ,
'type' => 'card' ,
'name' => 'pk_spam' ,
'name' => 'pk_spam' ,
'url' => 'https://aaronparecki.com/' ,
'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/'
'note' => 'My website is https://aaronparecki.com.dev/ and http://aaronpk.micro.blog/about/ and https://tiny.xyz.dev/'
], $data [ 'data' ]);
], $data [ 'data' ]);
}
}
@ -243,8 +243,8 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this -> assertEquals ( 'feed' , $data [ 'data' ][ 'type' ]);
$this -> assertEquals ( 'feed' , $data [ 'data' ][ 'type' ]);
$this -> assertEquals ( 12 , count ( $data [ 'data' ][ 'items' ]));
$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 () {
public function testInstagramPhotoWithAltText () {