Skip to content

Commit 16c0d61

Browse files
committed
tests
1 parent 85ade1e commit 16c0d61

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

tests/UrlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function testParser()
1313
'https://www.tumblr.com/oembed/1.0/' => 'https://www.tumblr.com/oembed/1.0/',
1414
'https://www.tumblr.com/oembed//1.0//' => 'https://www.tumblr.com/oembed/1.0/',
1515
'https://animoto.com/oembeds/create.xml?automated=true&options=start_hq' => 'https://animoto.com/oembeds/create.xml?automated=true&options=start_hq',
16-
'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'
16+
'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
];
1818

1919
foreach ($urls as $url => $expected_url) {

tests/UtilsTest.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@ class UtilsTest extends TestCaseBase
66
{
77
public function testSortByProvider()
88
{
9-
$val = [
10-
[
11-
'value' => '1',
12-
'providers' => ['html'],
13-
],[
9+
$vals = [
10+
2 => [
1411
'value' => '2',
12+
'providers' => ['html'],
13+
],
14+
0 => [
15+
'value' => '0',
1516
'providers' => ['opengraph'],
16-
],[
17-
'value' => '2',
17+
],
18+
1 => [
19+
'value' => '1',
1820
'providers' => ['html'],
19-
]
21+
],
2022
];
23+
24+
$first = Utils::getFirstValue($vals);
25+
26+
$this->assertEquals(2, $first);
2127
}
2228
}

0 commit comments

Comments
 (0)