1 | <?php |
||
19 | class ImageBundleTest extends WebTestBase { |
||
20 | |||
21 | /** |
||
22 | * Modules to enable. |
||
23 | * |
||
24 | * @var array |
||
25 | */ |
||
26 | public static $modules = ['media', 'media_entity', 'media_entity_image', 'image', 'node']; |
||
27 | |||
28 | /** |
||
29 | * The test media bundle. |
||
30 | * |
||
31 | * @var \Drupal\media_entity\MediaBundleInterface |
||
32 | */ |
||
33 | protected $testBundle; |
||
34 | /** |
||
35 | * Contains the media bundle storage |
||
36 | * |
||
37 | * @var \Drupal\media_entity\MediaBundleInterface |
||
38 | */ |
||
39 | protected $bundleStorage; |
||
40 | |||
41 | /** |
||
42 | * The test user. |
||
43 | * |
||
44 | * @var \Drupal\User\UserInterface |
||
45 | */ |
||
46 | protected $adminUser; |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | protected function setUp() { |
||
52 | parent::setUp(); |
||
53 | $entityManager = $this->container->get('entity.manager'); |
||
54 | $this->bundleStorage = $entityManager->getStorage('media_bundle'); |
||
55 | $this->testBundle = $this->bundleStorage->load('image'); |
||
56 | |||
57 | $this->adminUser = $this->drupalCreateUser([ |
||
58 | 'view media', |
||
59 | 'create media', |
||
60 | 'update media', |
||
61 | 'update any media', |
||
62 | 'delete media', |
||
63 | 'delete any media', |
||
64 | 'access media overview', |
||
65 | ]); |
||
66 | $this->drupalLogin($this->adminUser); |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * Tests image media bundle creation from config files. |
||
71 | */ |
||
72 | public function testMediaBundleCreationFromModule() { |
||
85 | |||
86 | /** |
||
87 | * Tests item creation and thumbnail |
||
88 | */ |
||
89 | public function testMediaBundleItemCreation() { |
||
136 | } |
||
137 |