diff --git a/core/modules/node/src/Tests/PageEditTest.php b/core/modules/node/src/Tests/PageEditTest.php
index b2d818b..e11423e 100644
--- a/core/modules/node/src/Tests/PageEditTest.php
+++ b/core/modules/node/src/Tests/PageEditTest.php
@@ -117,7 +117,8 @@ function testPageAuthoredBy() {
     $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
     $node_storage->resetCache(array($node->id()));
     $node = $node_storage->load($node->id());
-    $this->assertIdentical($node->getOwnerId(), '0', 'Node authored by anonymous user.');
+    $uid = $node->getOwnerId();
+    $this->assertTrue($uid === 0 || $uid === '0', 'Node authored by anonymous user.');
 
     // Change the authored by field to another user's name (that is not
     // logged in).
