testMemberLastEditedIsIndexed()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 12
Ratio 92.31 %

Importance

Changes 0
Metric Value
dl 12
loc 13
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
class IndexLastEditedExtensionTest extends FunctionalTest
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
4
{
5 View Code Duplication
    public function testGroupLastEditedIsIndexed()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
    {
7
        $group = new Group();
8
        $indexes = $group->databaseIndexes();
9
        $this->assertEquals(
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<IndexLastEditedExtensionTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
10
            array(
11
                'LastEdited' => true,
12
                'ClassName' => true,
13
                'ParentID' => true,
14
            ),
15
            $indexes
16
        );
17
    }
18
19 View Code Duplication
    public function testMemberLastEditedIsIndexed()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
20
    {
21
        $member = new Member();
22
        $indexes = $member->databaseIndexes();
23
        $this->assertEquals(
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<IndexLastEditedExtensionTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
24
            array(
25
                'Email' => true,
26
                'LastEdited' => true,
27
                'ClassName' => true,
28
            ),
29
            $indexes
30
        );
31
    }
32
33 View Code Duplication
    public function testSiteTreeLastEditedIsIndexed()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
34
    {
35
        $st = new SiteTree();
36
        $indexes = $st->databaseIndexes();
37
        $this->assertEquals(
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<IndexLastEditedExtensionTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
38
            array(
39
                'ParentID' => true,
40
                'URLSegment' => true,
41
                'LastEdited' => true,
42
                'ClassName' => true,
43
            ),
44
            $indexes
45
        );
46
    }
47
}
48