ShippingPackageTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 31
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B testPackages() 0 27 1
1
<?php
2
3
class ShippingPackageTest extends SapphireTest{
4
	
5
	function testPackages(){
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...
6
		
7
		$p = new ShippingPackage(25, array('depth' => 4, 'height' => 23,'width' => 12));
8
		$this->assertEquals($p->height(),23);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
9
		$this->assertEquals($p->width(),12);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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
		$this->assertEquals($p->depth(),4);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
11
		$this->assertEquals($p->weight(),25);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
12
		
13
		$p = new ShippingPackage(25.3, array('h' => 23.7, 'd' => 4, 'w' => 12.344,));
14
		$this->assertEquals($p->height(),23.7);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
15
		$this->assertEquals($p->width(),12.344);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
16
		$this->assertEquals($p->depth(),4);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
17
		$this->assertEquals($p->weight(),25.3);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
18
		
19
		$p = new ShippingPackage(1, array(3,4,5));
20
		$this->assertEquals($p->height(),3);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
21
		$this->assertEquals($p->width(),4);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
22
		$this->assertEquals($p->depth(),5);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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
		$this->assertEquals($p->volume(),60);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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
		
25
		$p = new ShippingPackage(13, array(1,1,2.5), array('shape' => 'cylinder'));
26
		$this->assertEquals($p->height(),1);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
27
		$this->assertEquals($p->depth(),2.5);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
28
		$this->assertEquals($p->weight(),13);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
29
		$this->assertEquals($p->volume(),2.5);
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ShippingPackageTest>.

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...
30
		
31
	}
32
	
33
}