3 namespace Drupal\image_widget_crop_examples\Tests;
5 use Drupal\simpletest\WebTestBase;
8 * Tests image_widget_crop_examples.
10 * @group image_widget_crop_examples
14 class ImageWidgetCropExamplesTest extends WebTestBase {
21 public static $modules = [
30 public function setUp() {
32 // Theme needs to be set before enabling image_widget_crop_examples because
34 \Drupal::service('theme_handler')->install(['bartik']);
35 $this->config('system.theme')
36 ->set('default', 'bartik')
38 $this->assertTrue(\Drupal::service('module_installer')->install(['image_widget_crop_examples']), 'image_widget_crop_examples installed.');
39 \Drupal::service('router.builder')->rebuild();
43 * Tests if image_widget_crop_example is correctly installed.
45 public function testInstalled() {
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:');