Kint_Object_RepresentationTest 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...
4
{
5
public function testConstruct()
6
{
7
$r = new Kint_Object_Representation('This is a label');
Avoid variables with short names like $r. 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...
8
$this->assertEquals('This is a label', $r->label);
9
$this->assertEquals('this_is_a_label', $r->name);
10
11
$r = new Kint_Object_Representation('This is a label', 'this_is_a_name');
12
$this->assertEquals('This is a label', $r->label);
13
$this->assertEquals('this_is_a_name', $r->name);
14
15
$r = new Kint_Object_Representation('Test # 3');
16
$this->assertEquals('Test # 3', $r->label);
17
$this->assertEquals('test_3', $r->name);
18
}
19
20
public function testGetLabel()
21
{
22
$r = new Kint_Object_Representation('This is a label');
Avoid variables with short names like $r. 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...
23
$this->assertEquals('This is a label', $r->getLabel());
24
$r->contents = array(1);
25
$this->assertEquals('This is a label', $r->getLabel());
26
$r->contents[] = 2;
27
$r->contents[] = 3;
28
$this->assertEquals('This is a label (3)', $r->getLabel());
29
}
30
31
public function testLabelIsImplicit()
32
{
33
$r = new Kint_Object_Representation('This is a label');
Avoid variables with short names like $r. 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.
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.