Commit 6f855794 authored by catch's avatar catch
Browse files

Issue #3317758 by DieterHolvoet: The return type of TermInterface::getWeight is wrong

(cherry picked from commit 8fb7236b)
parent 12490510
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ protected function assertEntity(int $id, string $expected_language, string $expe
    $this->assertSame($expected_vid, $entity->bundle());
    $this->assertSame($expected_description, $entity->getDescription());
    $this->assertSame($expected_format, $entity->getFormat());
    $this->assertSame($expected_weight, (int) $entity->getWeight());
    $this->assertSame($expected_weight, $entity->getWeight());
    $this->assertHierarchy($expected_vid, $id, $expected_parents);
  }

+1 −1
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ public function setName($name) {
   * {@inheritdoc}
   */
  public function getWeight() {
    return $this->get('weight')->value;
    return (int) $this->get('weight')->value;
  }

  /**
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ protected function assertEntity(int $id, string $expected_language, string $expe
    $this->assertSame($expected_vid, $entity->bundle());
    $this->assertSame($expected_description, $entity->getDescription());
    $this->assertSame($expected_format, $entity->getFormat());
    $this->assertSame($expected_weight, (int) $entity->getWeight());
    $this->assertSame($expected_weight, $entity->getWeight());
    $this->assertHierarchy($expected_vid, $id, $expected_parents);
  }

+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ protected function assertEntity(int $id, string $expected_language, string $expe
    $this->assertEquals($expected_vid, $entity->bundle());
    $this->assertEquals($expected_description, $entity->getDescription());
    $this->assertEquals($expected_format, $entity->getFormat());
    $this->assertEquals($expected_weight, (int) $entity->getWeight());
    $this->assertEquals($expected_weight, $entity->getWeight());
    $this->assertEquals($expected_parents, $this->getParentIDs($id));
    $this->assertHierarchy($expected_vid, $id, $expected_parents);
    if (!is_null($expected_field_integer_value)) {
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ protected function assertEntity(int $id, string $expected_language, string $expe
    $this->assertSame($expected_vid, $entity->bundle());
    $this->assertSame($expected_description, $entity->getDescription());
    $this->assertSame($expected_format, $entity->getFormat());
    $this->assertSame($expected_weight, (int) $entity->getWeight());
    $this->assertSame($expected_weight, $entity->getWeight());
    $this->assertHierarchy($expected_vid, $id, $expected_parents);
  }

Loading