Skip to content

Commit 641f55b

Browse files
committed
fixed instagram url with https
1 parent e092e38 commit 641f55b

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/Providers/OEmbed/Instagram.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static function getEndPoint()
1818
*/
1919
public static function getPatterns()
2020
{
21-
return ['http://instagram.com/p/*'];
21+
return ['https?://instagram.com/p/*'];
2222
}
2323

2424
/**

tests/InstagramTest.php

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
class InstagramTest extends PHPUnit_Framework_TestCase
33
{
4-
public function testOne()
4+
public function testHttp()
55
{
66
$info = Embed\Embed::create('http://instagram.com/p/ySl7G9tO_q/');
77

@@ -13,4 +13,17 @@ public function testOne()
1313
$this->assertEquals($info->authorUrl, 'https://instagram.com/agarzoniu');
1414
$this->assertEquals($info->providerName, 'Instagram');
1515
}
16+
17+
public function testHttps()
18+
{
19+
$info = Embed\Embed::create('https://instagram.com/p/ySl7G9tO_q/');
20+
21+
$this->assertEquals($info->title, 'Se va llenando el lugar donde Tsipras dará su mitin. Aún pendientes de si Syriza logra la mayoría absoluta, pero ya seguros de la victoria de la izquierda.');
22+
$this->assertEquals($info->imageWidth, 640);
23+
$this->assertEquals($info->imageHeight, 640);
24+
$this->assertEquals($info->type, 'rich');
25+
$this->assertEquals($info->authorName, 'agarzoniu');
26+
$this->assertEquals($info->authorUrl, 'https://instagram.com/agarzoniu');
27+
$this->assertEquals($info->providerName, 'Instagram');
28+
}
1629
}

0 commit comments

Comments
 (0)