Completed
Pull Request — development (#720)
by Thomas
24:05
created

OkapiVarsEntityTest::testEntity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
1
<?php 
2
3
 use OcTest\Modules\AbstractModuleTest; 
4
5
class OkapiVarsEntityTest extends AbstractModuleTest
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...
6
{
7
	public function testEntity()
8
	{
9
		$entity = new OkapiVarsEntity();
10
		        self::assertTrue($entity->isNew());
11
		    $entity->var = md5(time());$entity->value = md5(time());
12
		        $newEntity = new OkapiVarsEntity();
13
		        $newEntity->fromArray($entity->toArray());
14
15
		        self::assertEquals($entity, $newEntity);
16
		        self::assertFalse($entity->isNew());
17
	}
18
}
19