You are here

public function PreferredFeatureTest::testPreferredFeatureCanChangeWeight in Open Social 10.3.x

@covers ::setWeight

File

modules/social_features/social_branding/tests/src/Unit/PreferredFeatureTest.php, line 39

Class

PreferredFeatureTest
PreferredFeature test.

Namespace

Drupal\Tests\social_branding\Unit

Code

public function testPreferredFeatureCanChangeWeight() : void {
  $preferred_feature = new PreferredFeature('feature1', 1);
  $this
    ->assertEquals(1, $preferred_feature
    ->getWeight());
  $preferred_feature
    ->setWeight(2);
  $this
    ->assertEquals(2, $preferred_feature
    ->getWeight());
}