Skip to content

Commit 997f27d

Browse files
committed
Merge branch 'master' into v2.7
2 parents 0332efd + a76bf06 commit 997f27d

File tree

7 files changed

+18
-13
lines changed

7 files changed

+18
-13
lines changed

src/Url.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,20 @@ protected function buildUrl()
415415
$url .= $this->info['scheme'].'://';
416416
}
417417

418+
$user = isset($this->info['user']) ? $this->info['user'] : '';
419+
$pass = isset($this->info['pass']) ? ':'.$this->info['pass'] : '';
420+
if ($user || $pass) {
421+
$url .= $user.$pass.'@';
422+
}
423+
418424
if (isset($this->info['host'])) {
419425
$url .= $this->info['host'];
420426
}
421427

428+
if (isset($this->info['port'])) {
429+
$url .= ':'.$this->info['port'];
430+
}
431+
422432
$url .= $this->getPath();
423433

424434
if (!empty($this->info['query'])) {

tests/CodepenTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public function testAnonymous()
99
[
1010
'imageWidth' => 400,
1111
'imageHeight' => 225,
12-
'code' => '<iframe id="cp_embed_QwPVNW" src="https://codepen.io/anon/embed/preview/QwPVNW?height=300&amp;slug-hash=QwPVNW&amp;default-tab=result&amp;host=http%3A%2F%2Fcodepen.io" scrolling="no" frameborder="0" height="300" allowtransparency="true" class="cp_embed_iframe" style="width: 100%; overflow: hidden;"></iframe>',
12+
'code' => '<iframe id="cp_embed_QwPVNW" src="https://codepen.io/anon/embed/preview/QwPVNW?height=300&amp;amp;slug-hash=QwPVNW&amp;amp;default-tabs=css,result&amp;amp;host=http%3A%2F%2Fcodepen.io&amp;amp;embed-version=2" scrolling="no" frameborder="0" height="300" allowtransparency="true" class="cp_embed_iframe" style="width: 100%; overflow: hidden;"></iframe>',
1313
'type' => 'rich',
1414
]
1515
);
@@ -23,7 +23,7 @@ public function testNormal()
2323
'title' => 'TheaterJS',
2424
'imageWidth' => 384,
2525
'imageHeight' => 225,
26-
'code' => '<iframe id="cp_embed_JoRazP" src="https://codepen.io/Zhouzi/embed/preview/JoRazP?height=300&amp;slug-hash=JoRazP&amp;default-tab=result&amp;host=http%3A%2F%2Fcodepen.io" scrolling="no" frameborder="0" height="300" allowtransparency="true" class="cp_embed_iframe" style="width: 100%; overflow: hidden;"></iframe>',
26+
'code' => '<iframe id="cp_embed_JoRazP" src="https://codepen.io/Zhouzi/embed/preview/JoRazP?height=300&amp;amp;slug-hash=JoRazP&amp;amp;default-tabs=js,result&amp;amp;host=http%3A%2F%2Fcodepen.io&amp;amp;embed-version=2" scrolling="no" frameborder="0" height="300" allowtransparency="true" class="cp_embed_iframe" style="width: 100%; overflow: hidden;"></iframe>',
2727
'type' => 'rich',
2828
]
2929
);

tests/KickstarterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function testOne()
1010
'title' => 'Good Seed Craft Veggie Burgers',
1111
'description' => 'Nutrient-dense Real Food! Good Seed hemp patties transform the veggie burger with bold flavor blends & sprouted superfood ingredients.',
1212
'width' => 480,
13-
'height' => 360,
13+
'height' => 270,
1414
'authorName' => 'Oliver Ponce and Erin Shotwell',
1515
'providerName' => 'Kickstarter',
1616
]

tests/RedirectionsTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ public function testGoogleTranslate()
99
$this->assertString($info1->url, $info2->url);
1010
}
1111

12-
public function testRdio()
13-
{
14-
$info1 = Embed\Embed::create('http://rd.io/x/Q1IjXC8s');
15-
$info2 = Embed\Embed::create('https://www.rdio.com/artist/Soundgarden/album/Superunknown/?utm_campaign=share&utm_medium=Album&utm_source=13&utm_content=224371');
16-
$this->assertString($info1->url, $info2->url);
17-
}
18-
1912
public function testTwitter()
2013
{
2114
$info1 = Embed\Embed::create('https://twitter.com/#!/twitter/status/99530515043983360');

tests/SoundcloudTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public function testOne()
77
$this->assertEmbed(
88
'https://soundcloud.com/zedsdead/zeds-dead-twin-shadow-lost-you-feat-dangelo-lacy',
99
[
10-
'title' => "Zeds Dead - Lost You (feat. Twin Shadow & D'Angelo Lacy) by Zeds Dead",
10+
'title' => 'Lost You by Zeds Dead',
1111
'type' => 'rich',
1212
'code' => '<iframe width="100%" height="400" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?visual=true&url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F150745932&show_artwork=true"></iframe>',
1313
'providerName' => 'SoundCloud',
@@ -51,7 +51,7 @@ public function testMobile()
5151
$this->assertEmbed(
5252
'https://m.soundcloud.com/zedsdead/zeds-dead-twin-shadow-lost-you-feat-dangelo-lacy',
5353
[
54-
'title' => "Zeds Dead - Lost You (feat. Twin Shadow & D'Angelo Lacy) by Zeds Dead",
54+
'title' => 'Lost You by Zeds Dead',
5555
'type' => 'rich',
5656
'code' => '<iframe width="100%" height="400" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?visual=true&url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F150745932&show_artwork=true"></iframe>',
5757
'providerName' => 'SoundCloud',

tests/UrlTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public function urlsParserProvider()
1515
['https://animoto.com/oembeds/create.xml?automated=true&options=start_hq', 'https://animoto.com/oembeds/create.xml?automated=true&options=start_hq'],
1616
['http://static2.politico.com/dims4/default/28fb355/2147483647/resize/1160x%3E/quality/90/?url=http%3A%2F%2Fs3-origin-images.politico.com%2F2013%2F12%2F18%2F131218_george_w_bush_barack_obama_ap_60', 'http://static2.politico.com/dims4/default/28fb355/2147483647/resize/1160x%3E/quality/90/?url=http%3A%2F%2Fs3-origin-images.politico.com%2F2013%2F12%2F18%2F131218_george_w_bush_barack_obama_ap_60'],
1717
['https://plus.google.com/+carlsenverlag/posts/2hibgWrmhp1', 'https://plus.google.com/+carlsenverlag/posts/2hibgWrmhp1'],
18+
['http://test.drupal.dd:8083/tests/localport.html', 'http://test.drupal.dd:8083/tests/localport.html'],
19+
['http://testuser@test.drupal.dd:8083/tests/identified.html', 'http://testuser@test.drupal.dd:8083/tests/identified.html'],
20+
['http://testuser:testpass@test.drupal.dd:8083/tests/authenticated.html', 'http://testuser:testpass@test.drupal.dd:8083/tests/authenticated.html'],
1821
];
1922
}
2023

tests/UstreamTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ public function testOne()
1212
'imageHeight' => 90,
1313
'type' => 'video',
1414
'authorName' => 'redsh0es',
15-
'authorUrl' => 'http://www.ustream.tv/user/redsh0es',
1615
'providerName' => 'Ustream',
1716
'providerUrl' => 'http://www.ustream.tv/',
1817
]

0 commit comments

Comments
 (0)