Upgraded imagemagick and manually altered pdf to image module to handle changes....
[yaffs-website] / web / modules / contrib / image_widget_crop / modules / image_widget_crop_examples / src / Tests / ImageWidgetCropExamplesTest.php
1 <?php
2
3 namespace Drupal\image_widget_crop_examples\Tests;
4
5 use Drupal\simpletest\WebTestBase;
6
7 /**
8  * Tests image_widget_crop_examples.
9  *
10  * @group image_widget_crop_examples
11  *
12  * @ingroup media
13  */
14 class ImageWidgetCropExamplesTest extends WebTestBase {
15
16   /**
17    * Modules to install.
18    *
19    * @var array
20    */
21   public static $modules = [
22     'menu_ui',
23     'path',
24     'media',
25   ];
26
27   /**
28    * {@inheritdoc}
29    */
30   public function setUp() {
31     parent::setUp();
32     // Theme needs to be set before enabling image_widget_crop_examples because
33     // of dependency.
34     \Drupal::service('theme_handler')->install(['bartik']);
35     $this->config('system.theme')
36       ->set('default', 'bartik')
37       ->save();
38     $this->assertTrue(\Drupal::service('module_installer')->install(['image_widget_crop_examples']), 'image_widget_crop_examples installed.');
39     \Drupal::service('router.builder')->rebuild();
40   }
41
42   /**
43    * Tests if image_widget_crop_example is correctly installed.
44    */
45   public function testInstalled() {
46     $this->drupalGet('');
47     $this->assertTitle('Image Widget Crop examples | Drupal');
48     $this->assertText('Image Widget Crop examples');
49     $this->assertText('Welcome to Image Widget Crop example.');
50     $this->assertText('Image Widget Crop provides an interface for using the features of the Crop API.');
51     $this->assertText('You can test the functionality with custom content types created for the demonstration of features from Image Widget Crop:');
52   }
53
54 }