Completed
Push — master ( 6c0735...dd8543 )
by Dennis
06:47
created

WP_Test_MslsMain   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A test_get_input_array_method() 0 9 1
A test_is_autosave_method() 0 3 1
A test_verify_nonce_method() 0 3 1
1
<?php
2
/**
3
 * Tests for MslsMain
4
 *
5
 * @author Dennis Ploetner <[email protected]>
6
 * @package Msls
7
 */
8
9
use lloc\Msls\MslsMain;
10
use lloc\Msls\MslsOptions;
11
use lloc\Msls\MslsBlogCollection;
12
13
/**
14
 * WP_Test_MslsMain
15
 */
16
class WP_Test_MslsMain extends Msls_UnitTestCase {
17
18
	/**
19
	 * Verify the get_input_array-method
20
	 */
21
	function test_get_input_array_method() {
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...
22
		$options    = MslsOptions::instance();
23
		$collection = MslsBlogCollection::instance();
24
		$obj        = new MslsMain( $options, $collection );
25
26
		$this->assertInternalType( 'array', $obj->get_input_array( 0 ) );
27
28
		return $obj;
29
	}
30
31
	/**
32
	 * Verify the is_autosave-method
33
	 * @depends test_get_input_array_method
34
	 */
35
	function test_is_autosave_method( $obj ) {
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...
36
		$this->assertInternalType( 'boolean', $obj->is_autosave( 0 ) );
37
	}
38
39
	/**
40
	 * Verify the verify_nonce-method
41
	 * @depends test_get_input_array_method
42
	 */
43
	function test_verify_nonce_method( $obj ) {
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...
44
		$this->assertInternalType( 'boolean', $obj->verify_nonce() );
45
	}
46
47
}
48