OpauthMemberExtensionTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testDeletesOpauthIdentityOnDelete() 0 11 1
1
<?php
2
class OpauthMemberExtensionTest extends SapphireTest {
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...
3
4
	protected $usesDatabase = true;
5
6
	protected $requiredExtensions = array(
7
		'Member' => array('OpauthMemberExtension')
8
	);
9
10
	public function testDeletesOpauthIdentityOnDelete() {
11
		$member = new Member(array('Email' => '[email protected]'));
12
		$member->write();
13
		$identity = new OpauthIdentity();
14
		$identity->write();
15
		$member->OpauthIdentities()->add($identity);
16
		
17
		$member->delete();
18
		
19
		$this->assertEquals(0, $member->OpauthIdentities()->Count());
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<OpauthMemberExtensionTest>.

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...
20
	}
21
22
}