diff --git a/core/modules/system/tests/modules/test_user_config/test_user_config.info.yml b/core/modules/system/tests/modules/test_user_config/test_user_config.info.yml index d7df7fc0a23ed81790b403eecfc191ba26cda377..ebc47c092e25105b1fd0763c8934693022fd5412 100644 --- a/core/modules/system/tests/modules/test_user_config/test_user_config.info.yml +++ b/core/modules/system/tests/modules/test_user_config/test_user_config.info.yml @@ -5,3 +5,5 @@ package: Testing version: VERSION dependencies: - drupal:user + - drupal:field + - drupal:image diff --git a/core/modules/user/tests/src/Functional/UserPictureTest.php b/core/modules/user/tests/src/Functional/UserPictureTest.php index 6d8fb5c1072c78e34db8ee9aedd9d0a8c7e28184..4c0525331bfb11aa53359dce243b5db2a02fc42e 100644 --- a/core/modules/user/tests/src/Functional/UserPictureTest.php +++ b/core/modules/user/tests/src/Functional/UserPictureTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\user\Functional; +use Drupal\comment\Tests\CommentTestTrait; use Drupal\Core\Database\Database; use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\Core\StreamWrapper\StreamWrapperManager; @@ -20,16 +21,16 @@ class UserPictureTest extends BrowserTestBase { use TestFileCreationTrait { getTestFiles as drupalGetTestFiles; } + use CommentTestTrait; /** - * The profile to install as a basis for testing. - * - * Using the standard profile to test user picture config provided by the - * standard profile. - * - * @var string + * {@inheritdoc} */ - protected $profile = 'standard'; + protected static $modules = [ + 'test_user_config', + 'node', + 'comment', + ]; /** * {@inheritdoc} @@ -108,6 +109,9 @@ public function testCreateDeletePicture() { public function testPictureOnNodeComment() { $this->drupalLogin($this->webUser); + $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']); + $this->addDefaultCommentField('node', 'article'); + // Save a new picture. $image = current($this->drupalGetTestFiles('image')); $file = $this->saveUserPicture($image);