Completed
Pull Request — 8.x-1.x (#33)
by
unknown
02:29
created
src/Tests/UrlEmbedFilterTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
    */
25 25
   public function testFilter() {
26 26
     // Tests url embed using sample flickr url.
27
-    $content = '<drupal-url data-embed-url="' . static::FLICKR_URL . '">This placeholder should not be rendered.</drupal-url>';
27
+    $content = '<drupal-url data-embed-url="'.static::FLICKR_URL.'">This placeholder should not be rendered.</drupal-url>';
28 28
     $settings = array();
29 29
     $settings['type'] = 'page';
30 30
     $settings['title'] = 'Test url embed with sample flickr url';
31 31
     $settings['body'] = array(array('value' => $content, 'format' => 'custom_format'));
32 32
     $node = $this->drupalCreateNode($settings);
33
-    $this->drupalGet('node/' . $node->id());
33
+    $this->drupalGet('node/'.$node->id());
34 34
     $this->assertRaw(static::FLICKR_OUTPUT_WYSIWYG);
35 35
     $this->assertNoText(strip_tags($content), 'Placeholder does not appear in the output when embed is successful.');
36 36
 
@@ -41,27 +41,27 @@  discard block
 block discarded – undo
41 41
     $settings['title'] = 'Test that placeholder is retained when specified URL does not exists';
42 42
     $settings['body'] = array(array('value' => $content, 'format' => 'custom_format'));
43 43
     $node = $this->drupalCreateNode($settings);
44
-    $this->drupalGet('node/' . $node->id());
44
+    $this->drupalGet('node/'.$node->id());
45 45
     $this->assertNoText(strip_tags($content), 'Placeholder does not appear in the output when embed is unsuccessful.');
46 46
 
47 47
     // Test that tag of container element is not replaced when it's not
48 48
     // <drupal-url>.
49
-    $content = '<not-drupal-url data-embed-url="' . static::FLICKR_URL . '" data-url-provider="Flickr">this placeholder should not be rendered.</not-drupal-url>';
49
+    $content = '<not-drupal-url data-embed-url="'.static::FLICKR_URL.'" data-url-provider="Flickr">this placeholder should not be rendered.</not-drupal-url>';
50 50
     $settings = array();
51 51
     $settings['type'] = 'page';
52 52
     $settings['title'] = 'test url embed with embed-url';
53 53
     $settings['body'] = array(array('value' => $content, 'format' => 'custom_format'));
54 54
     $node = $this->drupalCreateNode($settings);
55
-    $this->drupalget('node/' . $node->id());
55
+    $this->drupalget('node/'.$node->id());
56 56
     $this->assertRaw('</not-drupal-url>');
57
-    $content = '<div data-embed-url="' . static::FLICKR_URL . '">this placeholder should not be rendered.</div>';
57
+    $content = '<div data-embed-url="'.static::FLICKR_URL.'">this placeholder should not be rendered.</div>';
58 58
     $settings = array();
59 59
     $settings['type'] = 'page';
60 60
     $settings['title'] = 'test url embed with embed-url';
61 61
     $settings['body'] = array(array('value' => $content, 'format' => 'custom_format'));
62 62
     $node = $this->drupalCreateNode($settings);
63
-    $this->drupalget('node/' . $node->id());
64
-    $this->assertRaw('<div data-embed-url="' . static::FLICKR_URL . '"');
63
+    $this->drupalget('node/'.$node->id());
64
+    $this->assertRaw('<div data-embed-url="'.static::FLICKR_URL.'"');
65 65
 
66 66
     // Enable the settings option to use a responsive wrapper
67 67
     $format = FilterFormat::load('custom_format');
@@ -71,14 +71,14 @@  discard block
 block discarded – undo
71 71
     $format->save();
72 72
 
73 73
     // Tests responsive url embed using sample flickr url.
74
-    $content = '<drupal-url data-embed-url="' . static::FLICKR_URL . '">This placeholder should not be rendered.</drupal-url>';
74
+    $content = '<drupal-url data-embed-url="'.static::FLICKR_URL.'">This placeholder should not be rendered.</drupal-url>';
75 75
     $settings = array();
76 76
     $settings['type'] = 'page';
77 77
     $settings['title'] = 'Test responsive url embed with sample Flickr url';
78 78
     $settings['body'] = array(array('value' => $content, 'format' => 'custom_format'));
79 79
     $node = $this->drupalCreateNode($settings);
80
-    $this->drupalGet('node/' . $node->id());
81
-    $this->assertRaw('<div class="responsive-embed" style="padding-bottom: 66.699%">' . static::FLICKR_OUTPUT_WYSIWYG . '</div>');
80
+    $this->drupalGet('node/'.$node->id());
81
+    $this->assertRaw('<div class="responsive-embed" style="padding-bottom: 66.699%">'.static::FLICKR_OUTPUT_WYSIWYG.'</div>');
82 82
     $this->assertNoText(strip_tags($content), 'Placeholder does not appear in the output when embed is successful.');
83 83
 
84 84
   }
Please login to merge, or discard this patch.
url_embed.module 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,6 +25,6 @@
 block discarded – undo
25 25
 
26 26
   // Add the responsive embed css if the url_embed module has it enabled
27 27
   if (!empty($config['settings']['enable_responsive'])) {
28
-    $css[] = drupal_get_path('module', 'url_embed') . '/css/url_embed.responsive.css';
28
+    $css[] = drupal_get_path('module', 'url_embed').'/css/url_embed.responsive.css';
29 29
   }
30 30
 }
Please login to merge, or discard this patch.