5 * Definition of Drupal\filefield_sources\Tests\ClipboardSourceTest.
8 namespace Drupal\filefield_sources\Tests;
11 * Tests the imce source.
13 * @group filefield_sources
15 class ImceSourceTest extends FileFieldSourcesTestBase {
22 public static $modules = array('imce');
25 * Sets up for imce source test case.
27 protected function setUp() {
33 * Tests imce source enabled.
35 public function testImceSourceEnabled() {
36 $this->enableSources(array(
39 $file = $this->createPermanentFileEntity();
41 $this->uploadFileByImceSource($file->getFileUri(), $file->getFilename(), 0);
43 // We can only upload one file on single value field.
44 $this->assertNoFieldByXPath('//input[@type="submit"]', t('Select'), t('After uploading a file, "Select" button is no longer displayed.'));
46 $this->removeFile($file->getFilename(), 0);
48 // Can upload file again.
49 $this->assertFieldByXpath('//input[@type="submit"]', t('Select'), 'After clicking the "Remove" button, the "Select" button is displayed.');