@@ -40,8 +40,7 @@ |
||
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 | } |
@@ -18,7 +18,7 @@ |
||
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. |
@@ -22,13 +22,13 @@ discard block |
||
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 |
||
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 | } |