Commit fb2b7cf9 authored by git's avatar git Committed by Damien McKenna
Browse files

Issue #3154416 by novchuk.v: Replace assert* involving an instanceof operator...

Issue #3154416 by novchuk.v: Replace assert* involving an instanceof operator with assertInstanceOf()/assertNotInstanceOf().
parent 3ccb9ab2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ Metatag 8.x-1.x-dev, xxxx-xx-xx
#3159192 by heddn: Hide from translation system from unsupported entities.
#3175269 by mbovan, DamienMcKenna: Pass optional bubbleable metadata parameter
  to generateRawElements to avoid issues with early rendering and JSON:API.
#3154416 by novchuk.v: Replace assert* involving an instanceof operator with
  assertInstanceOf()/assertNotInstanceOf().


Metatag 8.x-1.14, 2020-08-11
+4 −4
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ class MetatagEntitiesTest extends MigrateDrupal7TestBase {
  public function testMetatag() {
    /** @var \Drupal\node\Entity\Node $node */
    $node = Node::load(998);
    $this->assertTrue($node instanceof NodeInterface);
    $this->assertInstanceOf(NodeInterface::class, $node);
    $this->assertTrue($node->hasField('field_metatag'));
    // This should have the "current revision" keywords value, indicating it is
    // the current revision.
@@ -132,7 +132,7 @@ class MetatagEntitiesTest extends MigrateDrupal7TestBase {
    $this->assertSame(serialize($expected), $node->field_metatag->value);

    $node = node_revision_load(998);
    $this->assertTrue($node instanceof NodeInterface);
    $this->assertInstanceOf(NodeInterface::class, $node);
    $this->assertTrue($node->hasField('field_metatag'));
    // This should have the "old revision" keywords value, indicating it is
    // a non-current revision.
@@ -145,7 +145,7 @@ class MetatagEntitiesTest extends MigrateDrupal7TestBase {

    /** @var \Drupal\user\Entity\User $user */
    $user = User::load(2);
    $this->assertTrue($user instanceof UserInterface);
    $this->assertInstanceOf(UserInterface::class, $user);
    $this->assertTrue($user->hasField('field_metatag'));
    $expected = [
      'keywords' => 'a user',
@@ -155,7 +155,7 @@ class MetatagEntitiesTest extends MigrateDrupal7TestBase {

    /** @var \Drupal\taxonomy\Entity\Term $term */
    $term = Term::load(152);
    $this->assertTrue($term instanceof TermInterface);
    $this->assertInstanceOf(TermInterface::class, $term);
    $this->assertTrue($term->hasField('field_metatag'));
    $expected = [
      'keywords' => 'a taxonomy',