Completed
Push — master ( a92ee2...268555 )
by Dmitry
04:05
created

NullObjectSpec::objectBehavior()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 14
nc 1
nop 0
dl 0
loc 18
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace PHPKitchen\Platform\Specs\Unit\Struct;
4
5
use PHPKitchen\Platform\Data\NullObject;
6
use PHPKitchen\Platform\Specs\Base\Spec;
7
8
/**
9
 * Specification for {@link NullObject}
10
 *
11
 * @author Dmitry Kolodko <[email protected]>
12
 */
13
class NullObjectSpec extends Spec {
14
    /**
15
     * @test
16
     */
17
    public function objectBehavior() {
18
        $nullObject = new NullObject();
19
20
        $I = $this->tester;
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
Comprehensibility introduced by
Avoid variables with short names like $I. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
21
        $I->describe('behavior of null object');
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
22
23
        $I->expectThat('NullObject check methods always always show it as null and empty');
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
24
        $I->seeBool($nullObject->isNull())
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
25
          ->isTrue();
26
        $I->seeBool($nullObject->isEmpty())
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
27
          ->isTrue();
28
29
        $I->expectThat('NullObject is always equal to `null` and NullObject\'s');
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
30
        $I->seeBool($nullObject->isEqualTo(null))
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
31
          ->isTrue();
32
        $I->seeBool($nullObject->isEqualTo(new NullObject()))
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
33
          ->isTrue();
34
    }
35
}