YetiForceCompany/YetiForceCRM

View on GitHub
tests/Init/IntegrationTest.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Missing class import via use statement (line '39', column '34').
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_calendarinstances')->count()));
Severity: Minor
Found in tests/Init/IntegrationTest.php by phpmd

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 '37', column '34').
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_principals')->count()));
Severity: Minor
Found in tests/Init/IntegrationTest.php by phpmd

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 '38', column '34').
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_addressbooks')->count()));
Severity: Minor
Found in tests/Init/IntegrationTest.php by phpmd

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 '36', column '34').
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_users')->where(['key' => $result])->count()));
Severity: Minor
Found in tests/Init/IntegrationTest.php by phpmd

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 '40', column '34').
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_calendars')->count()));
Severity: Minor
Found in tests/Init/IntegrationTest.php by phpmd

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

Avoid using static access to class '\Settings_Dav_Module_Model' in method 'testAddSampleUserToDav'.
Open

        $moduleModel = \Settings_Dav_Module_Model::getInstance('Settings:Dav');
Severity: Minor
Found in tests/Init/IntegrationTest.php by phpmd

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 undeclared method \App\Db\Query::from
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_calendarinstances')->count()));
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Static call to undeclared method \Tests\Init\IntegrationTest::assertTrue
Open

        static::assertTrue(0 !== $result, $result);
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Static call to undeclared method \Tests\Init\IntegrationTest::assertTrue
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_users')->where(['key' => $result])->count()));
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Static call to undeclared method \Tests\Init\IntegrationTest::assertTrue
Open

        static::assertTrue(1 !== $result, $result);
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Call to undeclared method \App\Db\Query::from
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_calendars')->count()));
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Static call to undeclared method \Tests\Init\IntegrationTest::assertSame
Open

        static::assertSame(mb_strlen($result), 10, $result);
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Argument 1 (str) is int but \mb_strlen() takes string
Open

        static::assertSame(mb_strlen($result), 10, $result);
Severity: Minor
Found in tests/Init/IntegrationTest.php by phan

Call to undeclared method \App\Db\Query::from
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_addressbooks')->count()));
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Static call to undeclared method \Tests\Init\IntegrationTest::assertTrue
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_calendars')->count()));
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Call to undeclared method \App\Db\Query::from
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_principals')->count()));
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Static call to undeclared method \Tests\Init\IntegrationTest::assertTrue
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_addressbooks')->count()));
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Static call to undeclared method \Tests\Init\IntegrationTest::assertTrue
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_calendarinstances')->count()));
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Static call to undeclared method \Tests\Init\IntegrationTest::assertTrue
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_principals')->count()));
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Call to undeclared method \App\Db\Query::from
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_users')->where(['key' => $result])->count()));
Severity: Critical
Found in tests/Init/IntegrationTest.php by phan

Spaces must be used to indent lines; tabs are not allowed
Open

            'CalDav',

Spaces must be used to indent lines; tabs are not allowed
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_addressbooks')->count()));

Spaces must be used to indent lines; tabs are not allowed
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_principals')->count()));

Spaces must be used to indent lines; tabs are not allowed
Open

        ], 1);

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

        $moduleModel = \Settings_Dav_Module_Model::getInstance('Settings:Dav');

Spaces must be used to indent lines; tabs are not allowed
Open

        static::assertTrue(1 !== $result, $result);

Spaces must be used to indent lines; tabs are not allowed
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_calendars')->count()));

Spaces must be used to indent lines; tabs are not allowed
Open

     * Testing add sample user to dav.

Spaces must be used to indent lines; tabs are not allowed
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_users')->where(['key' => $result])->count()));

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

        $result = $moduleModel->addKey([

Spaces must be used to indent lines; tabs are not allowed
Open

        static::assertTrue(0 !== $result, $result);

Spaces must be used to indent lines; tabs are not allowed
Open

        static::assertTrue(1 === ((new \App\Db\Query())->from('dav_calendarinstances')->count()));

Spaces must be used to indent lines; tabs are not allowed
Open

        static::assertSame(mb_strlen($result), 10, $result);

Spaces must be used to indent lines; tabs are not allowed
Open

    public function testAddSampleUserToDav()

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

            'CardDav',

There are no issues that match your filters.

Category
Status