@@ -13,11 +13,12 @@ final class Plugin_Test extends WP_UnitTestCase {
13
13
/**
14
14
* Test onload
15
15
*
16
- * @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::onload
16
+ * @covers \ <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::onload
17
17
*/
18
18
public function test_onload () {
19
19
$ instance = new stdClass ();
20
- $ plugin = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin ();
20
+
21
+ $ plugin = new \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin ();
21
22
$ result = $ plugin ->onload ( $ instance );
22
23
23
24
$ this ->assertNull ( $ result );
@@ -26,12 +27,12 @@ public function test_onload() {
26
27
/**
27
28
* Test init
28
29
*
29
- * @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::init
30
+ * @covers \ <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::init
30
31
*/
31
32
public function test_init () {
32
33
global $ wp_actions ;
33
34
34
- $ plugin = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin ();
35
+ $ plugin = new \ <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin ();
35
36
$ result = $ plugin ->init ();
36
37
37
38
$ this ->assertTrue ( isset ( $ wp_actions ['<%= US_SLUG %>_before_init ' ] ) );
@@ -43,10 +44,10 @@ public function test_init() {
43
44
/**
44
45
* Test authenticated_init when user is not logged in
45
46
*
46
- * @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
47
+ * @covers \ <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
47
48
*/
48
49
public function test_authenticated_init_when_user_is_not_logged_in () {
49
- $ plugin = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin ();
50
+ $ plugin = new \ <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin ();
50
51
$ authenticated_init = $ plugin ->authenticated_init ();
51
52
52
53
$ this ->assertFalse ( isset ( $ plugin ->admin ) );
@@ -56,13 +57,13 @@ public function test_authenticated_init_when_user_is_not_logged_in() {
56
57
/**
57
58
* Test authenticated_init when user is logged in
58
59
*
59
- * @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
60
+ * @covers \ <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
60
61
*/
61
62
public function test_authenticated_init_when_user_is_logged_in () {
62
63
$ user_id = $ this ->factory ->user ->create ();
63
64
wp_set_current_user ( $ user_id );
64
65
65
- $ plugin = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin ();
66
+ $ plugin = new \ <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin ();
66
67
$ authenticated_init = $ plugin ->authenticated_init ();
67
68
68
69
$ this ->assertTrue ( isset ( $ plugin ->admin ) );
0 commit comments