Commit 01eb824b authored by catch's avatar catch
Browse files

Issue #3308919 by smustgrave, Lendude: Fix test performance of...

Issue #3308919 by smustgrave, Lendude: Fix test performance of Drupal\Tests\user\Functional\UserPictureTest
parent 2a17c29f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5,3 +5,5 @@ package: Testing
version: VERSION
dependencies:
  - drupal:user
  - drupal:field
  - drupal:image
+11 −7
Original line number Diff line number Diff line
@@ -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);