1 | <?php |
||
17 | abstract class UrlEmbedTestBase extends WebTestBase { |
||
18 | |||
19 | /** |
||
20 | * Modules to enable. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | public static $modules = array('url_embed', 'node', 'ckeditor'); |
||
25 | |||
26 | /** |
||
27 | * The test user. |
||
28 | * |
||
29 | * @var \Drupal\user\UserInterface |
||
30 | */ |
||
31 | protected $webUser; |
||
32 | |||
33 | /** |
||
34 | * The test Flickr URL. |
||
35 | */ |
||
36 | const FLICKR_URL = 'http://www.flickr.com/photos/bees/2341623661/'; |
||
37 | |||
38 | /** |
||
39 | * The expected output of the Flickr URL in a link field. |
||
40 | */ |
||
41 | const FLICKR_OUTPUT_FIELD = '<a data-flickr-embed="true" href="https://www.flickr.com/photos/bees/2341623661/" title="ZB8T0193 by bees, on Flickr"><img src="https://farm4.staticflickr.com/3123/2341623661_7c99f48bbf_b.jpg" width="1024" height="683" alt="ZB8T0193"></a><script async src="https://embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>'; |
||
42 | |||
43 | /** |
||
44 | * The expected output of the Flickr URL in a WYSIWYG. |
||
45 | * |
||
46 | * Embeds rendered via the url_embed filter generate XHTML4 markup due to |
||
47 | * deficiencies with libxml2. |
||
48 | * |
||
49 | * @todo Remove once https://www.drupal.org/node/1333730 lands. |
||
50 | */ |
||
51 | const FLICKR_OUTPUT_WYSIWYG = '<a data-flickr-embed="true" href="https://www.flickr.com/photos/bees/2341623661/" title="ZB8T0193 by bees, on Flickr"><img src="https://farm4.staticflickr.com/3123/2341623661_7c99f48bbf_b.jpg" width="1024" height="683" alt="ZB8T0193" /></a><script async="" src="https://embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>'; |
||
52 | |||
53 | /** |
||
54 | * A set up for all tests. |
||
55 | */ |
||
56 | protected function setUp() { |
||
100 | |||
101 | } |
||
102 |