The class C_RecordActions has 14 public methods. Consider refactoring C_RecordActions to keep number of public methods under 10. Open
class C_RecordActions extends \Tests\Base
{
/**
* Temporary record object.
*
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
The method createProductRecord has a boolean flag argument $cache, which is a certain sign of a Single Responsibility Principle violation. Open
public static function createProductRecord($cache = true): \Vtiger_Record_Model
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '329', column '29'). Open
$this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '333', column '29'). Open
$this->assertSame(0, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method createSQuotesRecord has a boolean flag argument $cache, which is a certain sign of a Single Responsibility Principle violation. Open
public static function createSQuotesRecord($cache = true): \Vtiger_Record_Model
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method createDocumentsRecord has a boolean flag argument $cache, which is a certain sign of a Single Responsibility Principle violation. Open
public static function createDocumentsRecord($cache = true): \Vtiger_Record_Model
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '312', column '26'). Open
$this->assertTrue((new \App\Db\Query())->from('vtiger_account')->where(['account_type' => 'Customer'])->exists());
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method createAccountRecord has a boolean flag argument $cache, which is a certain sign of a Single Responsibility Principle violation. Open
public static function createAccountRecord($cache = true): \Vtiger_Record_Model
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '331', column '29'). Open
$this->assertSame(2, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method createContactRecord has a boolean flag argument $cache, which is a certain sign of a Single Responsibility Principle violation. Open
public static function createContactRecord($cache = true): \Vtiger_Record_Model
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method createLeadRecord has a boolean flag argument $cache, which is a certain sign of a Single Responsibility Principle violation. Open
public static function createLeadRecord($cache = true): \Vtiger_Record_Model
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid using static access to class '\App\User' in method 'createLeadRecord'. Open
$recordModel->set('assigned_user_id', \App\User::getCurrentUserId());
- 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 '\Vtiger_Record_Model' in method 'createDocumentsRecord'. Open
$recordModel = \Vtiger_Record_Model::getCleanInstance('Documents');
- 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 '\Vtiger_Record_Model' in method 'createAccountRecord'. Open
$recordModel = \Vtiger_Record_Model::getCleanInstance('Accounts');
- 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 '\Vtiger_Record_Model' in method 'createContactRecord'. Open
$recordModel = \Vtiger_Record_Model::getCleanInstance('Contacts');
- 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\Fields\File' in method 'createDocumentsRecord'. Open
$path = \App\Fields\File::getTmpPath() . 'phpunit.xml';
- 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 '\Vtiger_Record_Model' in method 'createSQuotesRecord'. Open
$recordModel = \Vtiger_Record_Model::getCleanInstance('SQuotes');
- 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 'createContactRecord'. Open
$recordModel->set('assigned_user_id', \App\User::getCurrentUserId());
- 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 '\Vtiger_Record_Model' in method 'createLeadRecord'. Open
$recordModel = \Vtiger_Record_Model::getCleanInstance('Leads');
- 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 '\Vtiger_Record_Model' in method 'createProductRecord'. Open
$recordModel = \Vtiger_Record_Model::getCleanInstance('Products');
- 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\Fields\File' in method 'createDocumentsRecord'. Open
$file = \App\Fields\File::loadFromPath($path);
- 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
Define a constant instead of duplicating this literal "vtiger_crmentity" 3 times. Open
$this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "crmid" 3 times. Open
$this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "deleted" 3 times. Open
$this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Static call to undeclared method \Tests\Base\C_RecordActions::assertSame
Open
self::assertSame('SQuotes', $record->getModuleName());
- Exclude checks
Static call to undeclared method \Tests\Base\C_RecordActions::assertNotEmpty
Open
self::assertNotEmpty($record->getInventoryData());
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open
$this->assertTrue(self::$recordAccounts->isCreateable());
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open
$this->assertTrue((new \App\Db\Query())->from('vtiger_account')->where(['account_type' => 'Customer'])->exists());
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertSame
Open
$this->assertSame(2, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Exclude checks
Saw unextractable annotation for comment '* @var bool'
Open
* @var bool
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open
$this->assertTrue(self::$recordAccounts->privilegeToArchive());
- Exclude checks
Argument 1 (state)
is 'Active'
but \Vtiger_Record_Model::changeState()
takes \type
defined at /code/modules/Vtiger/models/Record.php:1784
Open
self::$recordAccounts->changeState('Active');
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertFalse
Open
$this->assertFalse(self::$recordAccounts->isLockByFields());
- Exclude checks
Call to undeclared method \App\Db\Query::from
Open
$this->assertTrue((new \App\Db\Query())->from('vtiger_account')->where(['account_type' => 'Customer'])->exists());
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open
$this->assertTrue('YetiForce S.A.' === self::$recordAccounts->getDisplayName());
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
$this->assertSame(2, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Exclude checks
Static call to undeclared method \Tests\Base\C_RecordActions::assertSame
Open
self::assertSame('Accounts', $record->getModuleName());
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open
$this->assertTrue(self::$recordAccounts->privilegeToDelete());
- Exclude checks
Call to method getCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$recordModel->set('assigned_user_id', \App\User::getCurrentUserId());
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open
$this->assertTrue(self::$recordAccounts->isViewable());
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertFalse
Open
$this->assertFalse(self::$recordAccounts->privilegeToActivate());
- Exclude checks
Argument 1 (state)
is 'Trash'
but \Vtiger_Record_Model::changeState()
takes \type
defined at /code/modules/Vtiger/models/Record.php:1784
Open
self::$recordAccounts->changeState('Trash');
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertSame
Open
$this->assertSame(0, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Exclude checks
Saw unextractable annotation for comment '* @var bool'
Open
* @var bool
- Exclude checks
Static call to undeclared method \Tests\Base\C_RecordActions::assertIsInt
Open
self::assertIsInt($record->getId());
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertSame
Open
$this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Exclude checks
Argument 1 (state)
is 'Archived'
but \Vtiger_Record_Model::changeState()
takes \type
defined at /code/modules/Vtiger/models/Record.php:1784
Open
self::$recordAccounts->changeState('Archived');
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open
$this->assertTrue(self::$recordAccounts->isEditable());
- Exclude checks
Call to method getCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$recordModel->set('assigned_user_id', \App\User::getCurrentUserId());
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
$this->assertSame(0, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Exclude checks
Saw unextractable annotation for comment '* @var bool'
Open
* @var bool
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
$this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Exclude checks
Saw unextractable annotation for comment '* @var bool'
Open
* @var bool
- Exclude checks
Static call to undeclared method \Tests\Base\C_RecordActions::assertIsInt
Open
self::assertIsInt($record->getId());
- Exclude checks
Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open
$this->assertTrue(self::$recordAccounts->privilegeToMoveToTrash());
- Exclude checks
Saw unextractable annotation for comment '* @var bool'
Open
* @var bool
- Exclude checks
Reference to undeclared property \Vtiger_Record_Model->file
(Did you mean $file) Open
$recordModel->file = [
- Exclude checks
The class C_RecordActions is not named in CamelCase. Open
class C_RecordActions extends \Tests\Base
{
/**
* Temporary record object.
*
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
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
* Load lorem ipsum clear text for tests.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function createLoremIpsumText()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Load lorem ipsum html text for tests.
- 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
* @param mixed $cache
- 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
* Temporary record object.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected static $recordContacts;
- 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 static function createLeadRecord($cache = true): \Vtiger_Record_Model
- 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
if (self::$recordContacts && $cache) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('assigned_user_id', \App\User::getCurrentUserId());
- 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
$recordModel->set('accountname', 'YetiForce S.A.');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $cache
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function createSQuotesRecord($cache = true): \Vtiger_Record_Model
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($cache) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::$recordProducts = $recordModel;
- 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
* @var \Vtiger_Record_Model
- 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
if (self::$loremIpsumHtml) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->save();
- 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
$recordModel->set('contactstatus', '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
$recordModel->setInventoryItemPart(1, 'total', 10);
- 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 static function createProductRecord($cache = true): \Vtiger_Record_Model
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (self::$recordProducts && $cache) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (self::$recordDocuments && $cache) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('filename', $fileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($cache) {
- 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
$record = self::createSQuotesRecord();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var \Vtiger_Record_Model
- 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
return self::$loremIpsumText = \file_get_contents('./tests/data/stringText.txt');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($cache) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $cache
- 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
$recordModel->setInventoryItemPart(1, 'discountmode', 1);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('discontinued', 1);
- 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
* @param mixed $cache
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'name' => $fileName,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'size' => $file->getSize(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::assertIsInt($record->getId());
- 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
/** @var \Vtiger_Record_Model Temporary Documents record 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
* @var \Vtiger_Record_Model
- 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 static function createLoremIpsumHtml()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var bool
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('lastname', 'Testowy');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (self::$recordSQuotes && $cache) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $recordModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Creating Documents module record for tests.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return self::$recordDocuments;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$file = \App\Fields\File::loadFromPath($path);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testCheckLockFields()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing record editing.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing the record label.
- 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
protected static $recordProducts;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Temporary Leads record 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
* @var string
- 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
* @return \Vtiger_Record_Model
- 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
$recordModel = \Vtiger_Record_Model::getCleanInstance('Leads');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return \Vtiger_Record_Model
- 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
if ($cache) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function createAccountRecord($cache = true): \Vtiger_Record_Model
- 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
$recordModel->save();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::$recordSQuotes = $recordModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var bool
- 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
copy(ROOT_DIRECTORY . '/tests/phpunit.xml', $path);
- 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
protected static $recordDocuments;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return self::$loremIpsumHtml = \file_get_contents('./tests/data/stringHtml.txt');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->save();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Creating account module record for tests.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setInventoryItemPart(1, 'taxmode', 1);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setInventoryItemPart(1, 'price', 5);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setInventoryItemPart(1, 'net', 10);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setInventoryItemPart(1, 'purchase', 0);
- 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
return self::$recordProducts;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('notes_title', $fileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing the record creation.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::createSQuotesRecord();
- 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(self::$recordAccounts->privilegeToDelete());
- 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
self::$recordAccounts->changeState('Active');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var \Vtiger_Record_Model
- 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
* @var \Vtiger_Record_Model
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected static $recordSQuotes;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected static $recordLeads;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (self::$loremIpsumText) {
- 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
* @var bool
- 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
return self::$recordSQuotes;
- 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
$recordModel = \Vtiger_Record_Model::getCleanInstance('SQuotes');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setInventoryItemPart(1, 'gross', 10);
- 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->assertTrue((new \App\Db\Query())->from('vtiger_account')->where(['account_type' => 'Customer'])->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
* Temporary loremIpsum html.
- 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
return self::$loremIpsumHtml;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return self::$recordLeads;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('assigned_user_id', \App\User::getCurrentUserId());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return self::$recordContacts;
- 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
$recordModel->setInventoryItemPart(1, 'name', self::createProductRecord()->getId());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->save();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $recordModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->save();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'type' => $file->getMimeType(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::createDocumentsRecord();
- 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
self::$recordAccounts->set('accounttype', 'Customer');
- 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
* Temporary record 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
Spaces must be used to indent lines; tabs are not allowed Open
* Temporary Products record 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
* Creating leads module record for tests.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $recordModel;
- 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
$recordModel->setInventoryItemPart(1, 'qty', 2);
- 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
$recordModel = \Vtiger_Record_Model::getCleanInstance('Products');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('pscategory', 'T3');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($cache) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->save();
- 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
self::assertNotEmpty($record->getInventoryData());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testPermission()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Temporary loremIpsum text.
- 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
* Creating contacts module record for tests.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function createContactRecord($cache = true): \Vtiger_Record_Model
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel = \Vtiger_Record_Model::getCleanInstance('Contacts');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('parent_id', self::createAccountRecord()->getId());
- 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
self::$recordAccounts = $recordModel;
- 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
* Creating Product module record for tests.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $cache
- 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
* @var bool
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $recordModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$record = self::createAccountRecord();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::assertIsInt($record->getId());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::assertSame('SQuotes', $record->getModuleName());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing the edit block feature.
- 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
* @var \Vtiger_Record_Model
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('firstname', 'Test');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::$recordContacts = $recordModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $recordModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return self::$recordAccounts;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setInventoryItemPart(1, 'margin', 0);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function createDocumentsRecord($cache = true): \Vtiger_Record_Model
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$path = \App\Fields\File::getTmpPath() . 'phpunit.xml';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'tmp_name' => $file->getPath(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::createDocumentsRecord();
- 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
self::$recordAccounts->changeState('Archived');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected static $recordAccounts;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected static $recordCampaigns;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Temporary SQuotes record 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
protected static $loremIpsumHtml;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- 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
if (self::$recordLeads && $cache) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('description', 'autogenerated test lead for \App\TextParser tests');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('salutationtype', 'Mr.');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel = \Vtiger_Record_Model::getCleanInstance('Accounts');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($cache) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Creating SQuotes module record for tests.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('subject', 'System CRM YetiForce');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setInventoryItemPart(1, 'currency', 1);
- 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
$recordModel->set('unit_price', '{"currencies":{"1":{"price":"2222"}},"currencyId":1}');
- 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
$recordModel->file = [
- 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 testGetDisplayName()
- 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
* Temporary Contacts record 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
Spaces must be used to indent lines; tabs are not allowed Open
protected static $loremIpsumText;
- 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
* @param mixed $cache
- 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
* @var bool
- 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
$recordModel->setInventoryItemPart(1, 'discount', 0);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setInventoryItemPart(1, 'marginp', 0);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setInventoryItemPart(1, 'tax', 0);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setInventoryItemPart(1, 'comment1', '');
- 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
$recordModel->set('productname', 'System CRM YetiForce');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel = \Vtiger_Record_Model::getCleanInstance('Documents');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::$recordDocuments = $recordModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertFalse(self::$recordAccounts->privilegeToActivate());
- 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('YetiForce S.A.' === self::$recordAccounts->getDisplayName());
- 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->assertFalse(self::$recordAccounts->isLockByFields());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testStateRecord()
- 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
self::$recordAccounts->changeState('Trash');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame(0, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
$this->assertSame(0, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- 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
return self::$loremIpsumText;
- 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
self::$recordLeads = $recordModel;
- 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
$recordModel->set('filestatus', 1);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::assertSame('Accounts', $record->getModuleName());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue(self::$recordAccounts->isCreateable());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testEditRecord()
- 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 the change record state.
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
$this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame(2, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- 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
$recordModel->set('company', 'TestLead sp. z o.o.');
- 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
$recordModel->set('verification', 'Address details');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $recordModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('imagename', '[]');
- 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
$fileName = $file->getName();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('filelocationtype', 'I');
- 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(self::$recordAccounts->isViewable());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue((new \App\Db\Query())->from('vtiger_account')->where(['account_type' => 'Customer'])->exists());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue(self::$recordAccounts->privilegeToArchive());
- 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
self::$recordAccounts->save();
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
$this->assertSame(2, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
- 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
if (self::$recordAccounts && $cache) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('legal_form', 'PLL_COMPANY');
- 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
'error' => 0,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testCreateRecord()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing editing permissions.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue(self::$recordAccounts->isEditable());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue(self::$recordAccounts->privilegeToMoveToTrash());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Class name "C_RecordActions" is not in camel caps format Open
class C_RecordActions extends \Tests\Base
- Exclude checks