Completed
Pull Request — master (#119)
by Franco
02:40
created

DateRangeFieldTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testDateRangeFieldRequiredCSSIncluded() 0 9 1
1
<?php
2
3
/**
4
 * Class DateRangeFieldTest
5
 *
6
 * @package dms
7
 *
8
 */
9
class DateRangeFieldTest 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...
10
{
11
12
    /**
13
     * Tests whether at least one CSS file is included
14
     */
15
    function testDateRangeFieldRequiredCSSIncluded()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
16
    {
17
        $requirements = new Requirements();
18
        $backend = $requirements->backend();
19
20
        $dateRange = new DateRangeField('MyDate');
21
        $dateRange->Field();
22
        $this->assertGreaterThanOrEqual(1, count($backend->get_css()));
0 ignored issues
show
Bug introduced by
The method assertGreaterThanOrEqual() does not seem to exist on object<DateRangeFieldTest>.

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...
23
    }
24
}
25