Completed
Pull Request — 8.x-1.x (#28)
by Devin
02:51
created
src/Plugin/Field/FieldFormatter/LinkEmbedFormatter.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@
 block discarded – undo
40 40
               '#template' => $info->getCode(),
41 41
             );
42 42
           }
43
-        }
44
-        catch (\Exception $exception) {
43
+        } catch (\Exception $exception) {
45 44
           watchdog_exception('url_embed', $exception);
46 45
         }
47 46
       }
Please login to merge, or discard this patch.
src/Tests/LinkEmbedFormatterTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  *
19 19
  * @group url_embed
20 20
  */
21
-class LinkEmbedFormatterTest extends LinkFieldTest{
21
+class LinkEmbedFormatterTest extends LinkFieldTest {
22 22
 
23 23
   /**
24 24
    * Modules to enable.
Please login to merge, or discard this patch.
src/Tests/UrlEmbedFilterTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
    */
23 23
   public function testFilter() {
24 24
     // Tests url embed using sample flickr url.
25
-    $content = '<drupal-url data-embed-url="' . static::FLICKR_URL . '">This placeholder should not be rendered.</drupal-url>';
25
+    $content = '<drupal-url data-embed-url="'.static::FLICKR_URL.'">This placeholder should not be rendered.</drupal-url>';
26 26
     $settings = array();
27 27
     $settings['type'] = 'page';
28 28
     $settings['title'] = 'Test url embed with sample flickr url';
29 29
     $settings['body'] = array(array('value' => $content, 'format' => 'custom_format'));
30 30
     $node = $this->drupalCreateNode($settings);
31
-    $this->drupalGet('node/' . $node->id());
31
+    $this->drupalGet('node/'.$node->id());
32 32
     $this->assertRaw(static::FLICKR_OUTPUT_WYSIWYG);
33 33
     $this->assertNoText(strip_tags($content), 'Placeholder does not appear in the output when embed is successful.');
34 34
 
@@ -39,27 +39,27 @@  discard block
 block discarded – undo
39 39
     $settings['title'] = 'Test that placeholder is retained when specified URL does not exists';
40 40
     $settings['body'] = array(array('value' => $content, 'format' => 'custom_format'));
41 41
     $node = $this->drupalCreateNode($settings);
42
-    $this->drupalGet('node/' . $node->id());
42
+    $this->drupalGet('node/'.$node->id());
43 43
     $this->assertNoText(strip_tags($content), 'Placeholder does not appear in the output when embed is unsuccessful.');
44 44
 
45 45
     // Test that tag of container element is not replaced when it's not
46 46
     // <drupal-url>.
47
-    $content = '<not-drupal-url data-embed-url="' . static::FLICKR_URL . '" data-url-provider="Flickr">this placeholder should not be rendered.</not-drupal-url>';
47
+    $content = '<not-drupal-url data-embed-url="'.static::FLICKR_URL.'" data-url-provider="Flickr">this placeholder should not be rendered.</not-drupal-url>';
48 48
     $settings = array();
49 49
     $settings['type'] = 'page';
50 50
     $settings['title'] = 'test url embed with embed-url';
51 51
     $settings['body'] = array(array('value' => $content, 'format' => 'custom_format'));
52 52
     $node = $this->drupalCreateNode($settings);
53
-    $this->drupalget('node/' . $node->id());
53
+    $this->drupalget('node/'.$node->id());
54 54
     $this->assertRaw('</not-drupal-url>');
55
-    $content = '<div data-embed-url="' . static::FLICKR_URL . '">this placeholder should not be rendered.</div>';
55
+    $content = '<div data-embed-url="'.static::FLICKR_URL.'">this placeholder should not be rendered.</div>';
56 56
     $settings = array();
57 57
     $settings['type'] = 'page';
58 58
     $settings['title'] = 'test url embed with embed-url';
59 59
     $settings['body'] = array(array('value' => $content, 'format' => 'custom_format'));
60 60
     $node = $this->drupalCreateNode($settings);
61
-    $this->drupalget('node/' . $node->id());
62
-    $this->assertRaw('<div data-embed-url="' . static::FLICKR_URL . '"');
61
+    $this->drupalget('node/'.$node->id());
62
+    $this->assertRaw('<div data-embed-url="'.static::FLICKR_URL.'"');
63 63
   }
64 64
 
65 65
 }
Please login to merge, or discard this patch.