@ -37,9 +37,9 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$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.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://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://aaronparec ki.com /' , $data [ 'data' ][ 'author' ][ 'url' ]);
$this -> assertEquals ( 'https://www.instagram.com/ aaronpk/' , $data [ 'data' ][ 'author' ][ 'url' ]);
$this -> assertEquals ( 'Aaron Parecki' , $data [ 'data' ][ 'author' ][ 'name' ]);
$this -> assertEquals ( 'Aaron Parecki' , $data [ 'data' ][ 'author' ][ 'name' ]);
$this -> assertEquals ( 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/45aee453740a714bf408f8947f89da8e/5CCB4B8E/t51.2885-19/s320x32 0/14240576_268350536897085_1129715662_a.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net' , $data [ 'data' ][ 'author' ][ 'photo' ]);
$this -> assertEquals ( 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/a2909937316893f18760f1077ca88fa1/5CBB520A/t51.2885-19/s150x15 0/14240576_268350536897085_1129715662_a.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net' , $data [ 'data' ][ 'author' ][ 'photo' ]);
$this -> assertArrayNotHasKey ( 'meta' , $data [ 'data' ]); // make sure this does not include alt text (autogenerated placeholder from instagram)
$this -> assertArrayNotHasKey ( 'meta' , $data [ 'data' ]); // make sure this does not include alt text (autogenerated placeholder from instagram)
}
}
@ -60,14 +60,14 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this -> assertSame ([
$this -> assertSame ([
'type' => 'card' ,
'type' => 'card' ,
'name' => 'pk_spam' ,
'name' => 'pk_spam' ,
'url ' => 'htt ps://aaron parecki.co m/ ' ,
'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/'
'nickname ' => 'pk_ spam' ,
'url' => 'https://www.instagram.com/pk_spam/ ' ,
'photo' => 'https://scontent-frx5-1.cdninstagram.com/vp/f17e1275a70fc32e93cbf434ddc32bcd/5B6CCC7A/t51.2885-19/11906329_960233084022564_1448528159_a.jpg' ,
], $data [ 'data' ][ 'author' ]);
], $data [ 'data' ][ 'author' ]);
$this -> assertSame ([
$this -> assertSame ([
'muffins' ,
'muffins' ,
'https://indiewebcat.com /'
'https://www.instagram.com/ indiewebcat/'
], $data [ 'data' ][ 'category' ]);
], $data [ 'data' ][ 'category' ]);
$this -> assertEquals ( 'Meow #muffins' , $data [ 'data' ][ 'content' ][ 'text' ]);
$this -> assertEquals ( 'Meow #muffins' , $data [ 'data' ][ 'content' ][ 'text' ]);
@ -105,9 +105,9 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$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 ([ '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 ( 1 , count ( $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://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://aaronparec ki.com /' , $data [ 'data' ][ 'author' ][ 'url' ]);
$this -> assertEquals ( 'https://www.instagram.com/ aaronpk/' , $data [ 'data' ][ 'author' ][ 'url' ]);
$this -> assertEquals ( 'Aaron Parecki' , $data [ 'data' ][ 'author' ][ 'name' ]);
$this -> assertEquals ( 'Aaron Parecki' , $data [ 'data' ][ 'author' ][ 'name' ]);
$this -> assertEquals ( 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/45aee453740a714bf408f8947f89da8e/5CCB4B8E/t51.2885-19/s320x32 0/14240576_268350536897085_1129715662_a.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net' , $data [ 'data' ][ 'author' ][ 'photo' ]);
$this -> assertEquals ( 'https://instagram.fsjc1-3.fna.fbcdn.net/vp/a2909937316893f18760f1077ca88fa1/5CBB520A/t51.2885-19/s150x15 0/14240576_268350536897085_1129715662_a.jpg?_nc_ht=instagram.fsjc1-3.fna.fbcdn.net' , $data [ 'data' ][ 'author' ][ 'photo' ]);
}
}
public function testInstagramPhotoWithPersonTag () {
public function testInstagramPhotoWithPersonTag () {
@ -123,9 +123,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 -> assertEquals ([ 'type' => 'card' , 'name' => 'KmikeyM™️' , 'url' => 'https://kmikeym.co m/' , '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.co m/' ]);
$this -> assertContains ( 'https://kmikeym.co m/' , $data [ 'data' ][ 'category' ]);
$this -> assertArrayHasKey ( 'https://kmikeym.co m/' , $data [ 'data' ][ 'refs' ]);
$this -> assertEquals ([ 'type' => 'card' , 'name' => 'KmikeyM™️' , 'nickname' => 'kmikeym' , ' url' => 'https://www.instagram.com/ kmikeym/' , '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://www.instagram.com/ kmikeym/' ]);
$this -> assertContains ( 'https://www.instagram.com/ kmikeym/' , $data [ 'data' ][ 'category' ]);
$this -> assertArrayHasKey ( 'https://www.instagram.com/ kmikeym/' , $data [ 'data' ][ 'refs' ]);
}
}
public function testInstagramPhotoWithVenue () {
public function testInstagramPhotoWithVenue () {
@ -206,7 +206,8 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this -> assertSame ([
$this -> assertSame ([
'type' => 'card' ,
'type' => 'card' ,
'name' => 'Aaron Parecki' ,
'name' => 'Aaron Parecki' ,
'url' => 'https://aaronparecki.com/' ,
'nickname' => 'aaronpk' ,
'url' => 'https://www.instagram.com/aaronpk/' ,
'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' ,
'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'
'note' => '🔒 oauth.net 🎥 backpedal.tv 🎙 streampdx.com 📡 w7apk.com'
], $data [ 'data' ]);
], $data [ 'data' ]);
@ -226,7 +227,8 @@ class InstagramTest extends PHPUnit_Framework_TestCase {
$this -> assertSame ([
$this -> assertSame ([
'type' => 'card' ,
'type' => 'card' ,
'name' => 'pk_spam' ,
'name' => 'pk_spam' ,
'url' => 'https://aaronparecki.com/' ,
'nickname' => 'pk_spam' ,
'url' => 'https://www.instagram.com/pk_spam/' ,
'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' ,
'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' ]);