private function UnitTestBase::getNewUserMock in Entity Construction Kit (ECK) 8
Creates and returns a mocked user.
Return value
\Drupal\Core\Session\AccountProxyInterface The mocked user.
1 call to UnitTestBase::getNewUserMock()
- UnitTestBase::setUp in tests/
src/ Unit/ UnitTestBase.php
File
- tests/
src/ Unit/ UnitTestBase.php, line 138
Class
- UnitTestBase
- Base class for unit tests.
Namespace
Drupal\Tests\eck\UnitCode
private function getNewUserMock() {
$user_mock = $this
->getMockForAbstractClass('\\Drupal\\Core\\Session\\AccountProxyInterface');
$user_mock
->method('id')
->willReturn(1);
return $user_mock;
}