function NodeOwnerTest::testGetCurrentUserId

Tests the legacy method used as the default entity owner.

@group legacy @expectedDeprecation The ::getCurrentUserId method is deprecated in 8.6.x and will be removed before 9.0.0.

File

core/modules/node/tests/src/Kernel/NodeOwnerTest.php, line 107

Class

NodeOwnerTest
Tests node owner functionality.

Namespace

Drupal\Tests\node\Kernel

Code

public function testGetCurrentUserId() {
    $this->assertEquals([
        '0',
    ], Node::getCurrentUserId());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.