Avoid using static access to class '\App\User' in method 'testClearCache'. Open
$this->assertNull(\App\User::clearCache(), 'Cache clearance error');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testIsExists'. Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists(cached)');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testIsExists'. Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists(cached)');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testGetUserIdByName'. Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference(cached)');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testGetUserIdByName'. Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testIsExists'. Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testIsExists'. Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testGetSharingFile'. Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null(cached)');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testInstance'. Open
$this->assertInstanceOf('\App\User', \App\User::getCurrentUserModel(), 'Expected User current user object');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testGetSharingFile'. Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testInstance'. Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getCurrentUserModel()->getId(), 'Expected that user ids will be equal');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testGetSharingFile'. Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testGetUserIdByName'. Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testGetUserIdByName'. Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference(cached)');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testGetSharingFile'. Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null(cached)');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testGetSharingFile'. Open
$this->assertNull(\App\User::getSharingFile(0), 'Sharing file should be null(User not exists)');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Call to method clearCache
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertNull(\App\User::clearCache(), 'Cache clearance error');
- Exclude checks
Call to method getSharingFile
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null(cached)');
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertInstanceOf('\Settings_Roles_Record_Model', \App\User::getCurrentUserModel()->getRoleInstance(), 'Expected current user role object');
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertTrue(\App\User::getCurrentUserModel()->isActive(), 'Expected that current user is active');
- Exclude checks
Call to method getCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists');
- Exclude checks
Call to method isExists
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists');
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertInstanceOf('\Settings_Roles_Record_Model', \App\User::getCurrentUserModel()->getRoleInstance(), 'Expected current user role object(cached)');
- Exclude checks
Call to undeclared method \Tests\App\User::assertInstanceOf
Open
$this->assertInstanceOf('\Settings_Roles_Record_Model', \App\User::getCurrentUserModel()->getRoleInstance(), 'Expected current user role object(cached)');
- Exclude checks
Call to undeclared method \Tests\App\User::assertTrue
Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists');
- Exclude checks
Call to method getUserIdByName
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference');
- Exclude checks
Call to method getSharingFile
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null');
- Exclude checks
Call to undeclared method \Tests\App\User::assertInstanceOf
Open
$this->assertInstanceOf('\Settings_Roles_Record_Model', \App\User::getCurrentUserModel()->getRoleInstance(), 'Expected current user role object');
- Exclude checks
Call to undeclared method \Tests\App\User::assertTrue
Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists(cached)');
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertSame(\App\User::getCurrentUserModel()->getRoleInstance(), \App\User::getCurrentUserModel()->get('roleInstance'), 'Role instance should be same');
- Exclude checks
Call to undeclared method \Tests\App\User::assertTrue
Open
$this->assertTrue((bool) \App\User::getCurrentUserModel()->isAdmin(), 'Expected that current user is admin');
- Exclude checks
Call to method getUserIdByName
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference(cached)');
- Exclude checks
Call to undeclared method \Tests\App\User::assertSame
Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference(cached)');
- Exclude checks
Call to undeclared method \Tests\App\User::assertTrue
Open
$this->assertTrue(\App\User::getCurrentUserModel()->isActive(), 'Expected that current user is active');
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertNotEmpty(\App\User::getCurrentUserModel()->getName(), 'Expected current user name');
- Exclude checks
Call to undeclared method \Tests\App\User::assertNotEmpty
Open
$this->assertNotEmpty(\App\User::getCurrentUserModel()->getName(), 'Expected current user name');
- Exclude checks
Call to method getCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getCurrentUserModel()->getId(), 'Expected that user ids will be equal');
- Exclude checks
Call to undeclared method \Tests\App\User::assertNull
Open
$this->assertNull(\App\User::clearCache(), 'Cache clearance error');
- Exclude checks
Call to method getCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null(cached)');
- Exclude checks
Call to method getCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference');
- Exclude checks
Call to undeclared method \Tests\App\User::assertInstanceOf
Open
$this->assertInstanceOf('\App\User', \App\User::getCurrentUserModel(), 'Expected User current user object');
- Exclude checks
Call to undeclared method \Tests\App\User::assertNotNull
Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null');
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertTrue((bool) \App\User::getCurrentUserModel()->isAdmin(), 'Expected that current user is admin');
- Exclude checks
Call to method getCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists(cached)');
- Exclude checks
Call to undeclared method \Tests\App\User::assertSame
Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference');
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference(cached)');
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getCurrentUserModel()->getId(), 'Expected that user ids will be equal');
- Exclude checks
Call to undeclared method \Tests\App\User::assertNotNull
Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null(cached)');
- Exclude checks
Call to method getSharingFile
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertNull(\App\User::getSharingFile(0), 'Sharing file should be null(User not exists)');
- Exclude checks
Call to undeclared method \Tests\App\User::assertNull
Open
$this->assertNull(\App\User::getSharingFile(0), 'Sharing file should be null(User not exists)');
- Exclude checks
Call to undeclared method \Tests\App\User::assertSame
Open
$this->assertSame(\App\User::getCurrentUserModel()->getRoleInstance(), \App\User::getCurrentUserModel()->get('roleInstance'), 'Role instance should be same');
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference');
- Exclude checks
Call to method getCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference(cached)');
- Exclude checks
Call to undeclared method \Tests\App\User::assertSame
Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getCurrentUserModel()->getId(), 'Expected that user ids will be equal');
- Exclude checks
Call to method getCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null');
- Exclude checks
Call to method isExists
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists(cached)');
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertInstanceOf('\App\User', \App\User::getCurrentUserModel(), 'Expected User current user object');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null');
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null(cached)');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testInstance()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNull(\App\User::clearCache(), 'Cache clearance error');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNotEmpty(\App\User::getCurrentUserModel()->getName(), 'Expected current user name');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertInstanceOf('\Settings_Roles_Record_Model', \App\User::getCurrentUserModel()->getRoleInstance(), 'Expected current user role object(cached)');
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists(cached)');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testGet()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing function Get.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing instance creation.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testIsActive()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testIsExists()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists(cached)');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getCurrentUserModel()->getId(), 'Expected that user ids will be equal');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testGetSharingFile()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing get name.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testIsAdmin()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing if current user is active.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertInstanceOf('\App\User', \App\User::getCurrentUserModel(), 'Expected User current user object');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertInstanceOf('\Settings_Roles_Record_Model', \App\User::getCurrentUserModel()->getRoleInstance(), 'Expected current user role object');
- Exclude checks
Line exceeds 120 characters; contains 162 characters Open
$this->assertInstanceOf('\Settings_Roles_Record_Model', \App\User::getCurrentUserModel()->getRoleInstance(), 'Expected current user role object(cached)');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue((bool) \App\User::getCurrentUserModel()->isAdmin(), 'Expected that current user is admin');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing function getUserIdByName.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testGetName()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing get role instance.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue(\App\User::isExists(\App\User::getCurrentUserId()), 'Expected that current user exists');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing function isExists.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNull(\App\User::getSharingFile(0), 'Sharing file should be null(User not exists)');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Line exceeds 120 characters; contains 154 characters Open
$this->assertInstanceOf('\Settings_Roles_Record_Model', \App\User::getCurrentUserModel()->getRoleInstance(), 'Expected current user role object');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Line exceeds 120 characters; contains 166 characters Open
$this->assertSame(\App\User::getCurrentUserModel()->getRoleInstance(), \App\User::getCurrentUserModel()->get('roleInstance'), 'Role instance should be same');
- Exclude checks
Line exceeds 120 characters; contains 190 characters Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference(cached)');
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getCurrentUserModel()->getId(), 'Expected that user ids will be equal');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing cache clearance.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNotNull(\App\User::getSharingFile(\App\User::getCurrentUserId()), 'Sharing file should be not null(cached)');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testGetRoleInstance()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame(\App\User::getCurrentUserModel()->getRoleInstance(), \App\User::getCurrentUserModel()->get('roleInstance'), 'Role instance should be same');
- Exclude checks
Line exceeds 120 characters; contains 182 characters Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testClearCache()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing if current user is admin.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testGetUserIdByName()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing user sharing file loader.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue(\App\User::getCurrentUserModel()->isActive(), 'Expected that current user is active');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame(\App\User::getCurrentUserId(), \App\User::getUserIdByName(\App\User::getCurrentUserModel()->getDetail('user_name')), 'User id should be same as reference(cached)');
- Exclude checks