Skip to content
Permalink
Browse files

fixed tests

  • Loading branch information...
oscarotero committed Mar 21, 2019
1 parent 6b008a8 commit 1e2637b4ccdd05b5102873ff1347c9c6df342f2f
@@ -241,10 +241,10 @@ public function getDomain($first_level = false)
public function getDirectoryPosition($position)
{
if ($position === count($this->info['path'])) {
return $this->info['file'];
return urldecode($this->info['file']);
}
return isset($this->info['path'][$position]) ? $this->info['path'][$position] : null;
return isset($this->info['path'][$position]) ? urldecode($this->info['path'][$position]) : null;
}
/**
@@ -663,8 +663,8 @@ function ($matches) {
private static function urlEncode($path)
{
// : - used for files
// @ and , - used for GoogleMaps adapter url (in view and streetview modes)
return str_replace(['%3A','%40','%2C'], [':','@',','], rawurlencode($path));
// @, + and , - used for GoogleMaps adapter url (in view and streetview modes)
return str_replace(['%3A','%40','%2C', '%2B'], [':','@',',', '+'], rawurlencode($path));
}
private static function validUrlOrEmpty($url)

This file was deleted.

Oops, something went wrong.
@@ -4,6 +4,9 @@
class CadenaserTest extends AbstractTestCase
{
/**
* @group ignore
*/
public function testOne()
{
$this->assertEmbed(
@@ -36,7 +36,7 @@ public function testPlus()
[
'title' => 'Grow your business through email marketing Learn more here: http://bit.ly/Yr...',
'type' => 'rich',
'code' => '<script src="https://apis.google.com/js/plusone.js" type="text/javascript"></script><div class="g-post" data-href="https://plus.google.com/%2BStephanHovnanian/posts/6apV9FHgo4k"></div>',
'code' => '<script src="https://apis.google.com/js/plusone.js" type="text/javascript"></script><div class="g-post" data-href="https://plus.google.com/+StephanHovnanian/posts/6apV9FHgo4k"></div>',
'providerName' => 'Google Plus',
]
);
@@ -10,7 +10,7 @@ public function testImageShack()
'https://imageshack.com/i/f0KQQN7Uj',
[
'title' => '.',
'image' => 'http://imagizer.imageshack.us/scaled/medium/540/KQQN7U.jpg',
'image' => 'http://imagizer.imageshack.com/scaled/medium/540/KQQN7U.jpg',
'imageWidth' => 236,
'imageHeight' => 354,
'type' => 'link',
@@ -9,7 +9,7 @@ public function testOne()
$this->assertEmbed(
'https://www.pinterest.com/pin/106890191127977979/',
[
'title' => 'Pin by Leslie Carruthers on Icons | Pinterest | Jack nicholson, Actors and Celebrities',
'title' => 'Pin by Leslie Carruthers on Icons | Pinterest | Jack nicholson, Famous men and Hollywood stars',
'width' => 236,
'height' => 442,
'code' => '<a data-pin-do="embedPin" data-pin-lang="es" href="https://www.pinterest.com/pin/106890191127977979/"></a><script async defer src="//assets.pinterest.com/js/pinit.js"></script>',
@@ -11,7 +11,7 @@ public function testPlay()
[
'title' => 'A Cantar con Xabarin (Vol. I & II)',
'type' => 'rich',
'code' => '<iframe src="https://open.spotify.com/embed/album/7s66wU1XJ2NsUuWM2NKiUV" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>',
'code' => '<iframe width="300" height="380" allowtransparency="true" frameborder="0" allow="encrypted-media" title="Spotify Embed: A Cantar con Xabarin (Vol. I &amp; II)" src="https://open.spotify.com/embed/album/7s66wU1XJ2NsUuWM2NKiUV"></iframe>',
'providerName' => 'Spotify',
'providerUrl' => 'https://www.spotify.com',
]
@@ -25,7 +25,7 @@ public function testOpen()
[
'title' => 'A Cantar con Xabarin (Vol. I & II)',
'type' => 'rich',
'code' => '<iframe src="https://open.spotify.com/embed/album/7s66wU1XJ2NsUuWM2NKiUV" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>',
'code' => '<iframe width="300" height="380" allowtransparency="true" frameborder="0" allow="encrypted-media" title="Spotify Embed: A Cantar con Xabarin (Vol. I &amp; II)" src="https://open.spotify.com/embed/album/7s66wU1XJ2NsUuWM2NKiUV"></iframe>',
'providerName' => 'Spotify',
'providerUrl' => 'https://www.spotify.com',
]
@@ -22,7 +22,7 @@ public function testRedirect()
$this->assertEmbed(
'https://t.umblr.com/redirect?z=https%3A%2F%2Fcm.engineering%2Fhow-to-test-accessibility-of-emails-b68fed03f5f4&t=YmJlOWJlMDE2MTBhNjgzMGQ3OWI4YjcyYTc3ZGVmODVlMjQxZWU0OCxEMHp1MXlSVg%3D%3D&b=t%3ABS0dIKxiGtP4rIANih2MqA&p=http%3A%2F%2Ftoday.uxdesign.cc%2Fpost%2F174967774408%2Fhow-to-test-accessibility-of-emails',
[
'title' => 'How to test accessibility of emails – Campaign Monitor Engineering',
'title' => 'How to test accessibility of emails',
'url' => 'https://cm.engineering/how-to-test-accessibility-of-emails-b68fed03f5f4',
]
);
@@ -18,7 +18,7 @@ public function urlsParserProvider()
['https://www.tumblr.com/oembed//1.0//', 'https://www.tumblr.com/oembed/1.0/'],
['https://animoto.com/oembeds/create.xml?automated=true&options=start_hq', 'https://animoto.com/oembeds/create.xml?automated=true&options=start_hq'],
['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'],
['https://plus.google.com/+carlsenverlag/posts/2hibgWrmhp1', 'https://plus.google.com/%2Bcarlsenverlag/posts/2hibgWrmhp1'],
['https://plus.google.com/+carlsenverlag/posts/2hibgWrmhp1', 'https://plus.google.com/+carlsenverlag/posts/2hibgWrmhp1'],
['http://test.drupal.dd:8083/tests/localport.html', 'http://test.drupal.dd:8083/tests/localport.html'],
['http://testuser@test.drupal.dd:8083/tests/identified.html', 'http://testuser@test.drupal.dd:8083/tests/identified.html'],
['http://testuser:testpass@test.drupal.dd:8083/tests/authenticated.html', 'http://testuser:testpass@test.drupal.dd:8083/tests/authenticated.html'],

0 comments on commit 1e2637b

Please sign in to comment.
You can’t perform that action at this time.