@@ -18,51 +18,51 @@ |
||
18 | 18 | * @coversNothing |
19 | 19 | */ |
20 | 20 | class WordPoints_CubePoints_Importer_Comment_Leave_Hook_Test |
21 | - extends WordPoints_Importer_Hook_UnitTestCase { |
|
21 | + extends WordPoints_Importer_Hook_UnitTestCase { |
|
22 | 22 | |
23 | - /** |
|
24 | - * @since 1.2.0 |
|
25 | - */ |
|
26 | - protected $cubepoints_option = 'cp_comment_points'; |
|
23 | + /** |
|
24 | + * @since 1.2.0 |
|
25 | + */ |
|
26 | + protected $cubepoints_option = 'cp_comment_points'; |
|
27 | 27 | |
28 | - /** |
|
29 | - * @since 1.2.0 |
|
30 | - * |
|
31 | - * @dataProvider data_provider_types |
|
32 | - */ |
|
33 | - public function test( $type ) { |
|
28 | + /** |
|
29 | + * @since 1.2.0 |
|
30 | + * |
|
31 | + * @dataProvider data_provider_types |
|
32 | + */ |
|
33 | + public function test( $type ) { |
|
34 | 34 | |
35 | - $this->before( $type ); |
|
35 | + $this->before( $type ); |
|
36 | 36 | |
37 | - update_option( 'cp_del_comment_points', 10 ); |
|
37 | + update_option( 'cp_del_comment_points', 10 ); |
|
38 | 38 | |
39 | - $user_id = $this->factory->user->create(); |
|
40 | - $post_id = $this->factory->post->create( |
|
41 | - array( 'post_author' => $this->factory->user->create() ) |
|
42 | - ); |
|
39 | + $user_id = $this->factory->user->create(); |
|
40 | + $post_id = $this->factory->post->create( |
|
41 | + array( 'post_author' => $this->factory->user->create() ) |
|
42 | + ); |
|
43 | 43 | |
44 | - $comment_id = $this->factory->comment->create( |
|
45 | - array( |
|
46 | - 'comment_post_ID' => $post_id, |
|
47 | - 'comment_approved' => 0, |
|
48 | - 'user_id' => $user_id, |
|
49 | - ) |
|
50 | - ); |
|
44 | + $comment_id = $this->factory->comment->create( |
|
45 | + array( |
|
46 | + 'comment_post_ID' => $post_id, |
|
47 | + 'comment_approved' => 0, |
|
48 | + 'user_id' => $user_id, |
|
49 | + ) |
|
50 | + ); |
|
51 | 51 | |
52 | - $this->assertSame( 0, $this->get_user_points( $user_id ) ); |
|
52 | + $this->assertSame( 0, $this->get_user_points( $user_id ) ); |
|
53 | 53 | |
54 | - wp_update_comment( |
|
55 | - array( 'comment_ID' => $comment_id, 'comment_approved' => 1 ) |
|
56 | - ); |
|
54 | + wp_update_comment( |
|
55 | + array( 'comment_ID' => $comment_id, 'comment_approved' => 1 ) |
|
56 | + ); |
|
57 | 57 | |
58 | - $this->assertSame( 10, $this->get_user_points( $user_id ) ); |
|
58 | + $this->assertSame( 10, $this->get_user_points( $user_id ) ); |
|
59 | 59 | |
60 | - wp_update_comment( |
|
61 | - array( 'comment_ID' => $comment_id, 'comment_approved' => 0 ) |
|
62 | - ); |
|
60 | + wp_update_comment( |
|
61 | + array( 'comment_ID' => $comment_id, 'comment_approved' => 0 ) |
|
62 | + ); |
|
63 | 63 | |
64 | - $this->assertSame( 0, $this->get_user_points( $user_id ) ); |
|
65 | - } |
|
64 | + $this->assertSame( 0, $this->get_user_points( $user_id ) ); |
|
65 | + } |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | // EOF |
@@ -30,15 +30,15 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @dataProvider data_provider_types |
32 | 32 | */ |
33 | - public function test( $type ) { |
|
33 | + public function test($type) { |
|
34 | 34 | |
35 | - $this->before( $type ); |
|
35 | + $this->before($type); |
|
36 | 36 | |
37 | - update_option( 'cp_del_comment_points', 10 ); |
|
37 | + update_option('cp_del_comment_points', 10); |
|
38 | 38 | |
39 | 39 | $user_id = $this->factory->user->create(); |
40 | 40 | $post_id = $this->factory->post->create( |
41 | - array( 'post_author' => $this->factory->user->create() ) |
|
41 | + array('post_author' => $this->factory->user->create()) |
|
42 | 42 | ); |
43 | 43 | |
44 | 44 | $comment_id = $this->factory->comment->create( |
@@ -49,19 +49,19 @@ discard block |
||
49 | 49 | ) |
50 | 50 | ); |
51 | 51 | |
52 | - $this->assertSame( 0, $this->get_user_points( $user_id ) ); |
|
52 | + $this->assertSame(0, $this->get_user_points($user_id)); |
|
53 | 53 | |
54 | 54 | wp_update_comment( |
55 | - array( 'comment_ID' => $comment_id, 'comment_approved' => 1 ) |
|
55 | + array('comment_ID' => $comment_id, 'comment_approved' => 1) |
|
56 | 56 | ); |
57 | 57 | |
58 | - $this->assertSame( 10, $this->get_user_points( $user_id ) ); |
|
58 | + $this->assertSame(10, $this->get_user_points($user_id)); |
|
59 | 59 | |
60 | 60 | wp_update_comment( |
61 | - array( 'comment_ID' => $comment_id, 'comment_approved' => 0 ) |
|
61 | + array('comment_ID' => $comment_id, 'comment_approved' => 0) |
|
62 | 62 | ); |
63 | 63 | |
64 | - $this->assertSame( 0, $this->get_user_points( $user_id ) ); |
|
64 | + $this->assertSame(0, $this->get_user_points($user_id)); |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 |
@@ -14,22 +14,22 @@ |
||
14 | 14 | */ |
15 | 15 | class WordPoints_Importer_Tests_Feedback extends WordPoints_Importer_Feedback { |
16 | 16 | |
17 | - /** |
|
18 | - * The messages that have been reported. |
|
19 | - * |
|
20 | - * @since 1.0.0 |
|
21 | - * |
|
22 | - * @var string[][] |
|
23 | - */ |
|
24 | - public $messages = array(); |
|
17 | + /** |
|
18 | + * The messages that have been reported. |
|
19 | + * |
|
20 | + * @since 1.0.0 |
|
21 | + * |
|
22 | + * @var string[][] |
|
23 | + */ |
|
24 | + public $messages = array(); |
|
25 | 25 | |
26 | - /** |
|
27 | - * @since 1.0.0 |
|
28 | - */ |
|
29 | - protected function _send( $message, $type = 'info' ) { // @codingStandardsIgnoreLine |
|
26 | + /** |
|
27 | + * @since 1.0.0 |
|
28 | + */ |
|
29 | + protected function _send( $message, $type = 'info' ) { // @codingStandardsIgnoreLine |
|
30 | 30 | |
31 | - $this->messages[ $type ][] = $message; |
|
32 | - } |
|
31 | + $this->messages[ $type ][] = $message; |
|
32 | + } |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | // EOF |
@@ -26,9 +26,9 @@ |
||
26 | 26 | /** |
27 | 27 | * @since 1.0.0 |
28 | 28 | */ |
29 | - protected function _send( $message, $type = 'info' ) { // @codingStandardsIgnoreLine |
|
29 | + protected function _send($message, $type = 'info') { // @codingStandardsIgnoreLine |
|
30 | 30 | |
31 | - $this->messages[ $type ][] = $message; |
|
31 | + $this->messages[$type][] = $message; |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 |
@@ -21,113 +21,113 @@ |
||
21 | 21 | * @coversNothing |
22 | 22 | */ |
23 | 23 | abstract class WordPoints_Importer_Hook_UnitTestCase |
24 | - extends WordPoints_PHPUnit_TestCase_Points { |
|
25 | - |
|
26 | - /** |
|
27 | - * The option where CubePoints stores the number of points to award for this. |
|
28 | - * |
|
29 | - * @since 1.2.0 |
|
30 | - * |
|
31 | - * @var string |
|
32 | - */ |
|
33 | - protected $cubepoints_option; |
|
34 | - |
|
35 | - /** |
|
36 | - * The type of hook being tested. |
|
37 | - * |
|
38 | - * @since 1.2.0 |
|
39 | - * |
|
40 | - * @var string |
|
41 | - */ |
|
42 | - protected $type; |
|
43 | - |
|
44 | - /** |
|
45 | - * Test that the hook behaves properly. |
|
46 | - * |
|
47 | - * @since 1.2.0 |
|
48 | - * |
|
49 | - * @param string $type The type of test. |
|
50 | - * |
|
51 | - * @dataProvider data_provider_types |
|
52 | - */ |
|
53 | - abstract public function test( $type ); |
|
54 | - |
|
55 | - /** |
|
56 | - * Data provider for types of tests. |
|
57 | - * |
|
58 | - * @since 1.2.0 |
|
59 | - * |
|
60 | - * @return array |
|
61 | - */ |
|
62 | - public function data_provider_types() { |
|
63 | - return array( |
|
64 | - 'cubepoints' => array( 'cubepoints' ), |
|
65 | - 'wordpoints' => array( 'wordpoints' ), |
|
66 | - ); |
|
67 | - } |
|
68 | - |
|
69 | - /** |
|
70 | - * Set up before a test. |
|
71 | - * |
|
72 | - * @since 1.2.0 |
|
73 | - * |
|
74 | - * @param string $type The type of test being run. |
|
75 | - */ |
|
76 | - protected function before( $type ) { |
|
77 | - |
|
78 | - update_option( 'cp_reg_points', 0 ); |
|
79 | - |
|
80 | - $this->type = $type; |
|
81 | - |
|
82 | - update_option( $this->cubepoints_option, 10 ); |
|
83 | - |
|
84 | - if ( 'wordpoints' === $this->type ) { |
|
85 | - $this->do_points_import( 'settings' ); |
|
86 | - } |
|
87 | - } |
|
88 | - |
|
89 | - /** |
|
90 | - * Get the number of points a user has. |
|
91 | - * |
|
92 | - * @since 1.2.0 |
|
93 | - * |
|
94 | - * @param int $user_id The user ID. |
|
95 | - * |
|
96 | - * @return int The number of points the user has. |
|
97 | - */ |
|
98 | - protected function get_user_points( $user_id ) { |
|
99 | - if ( 'cubepoints' === $this->type ) { |
|
100 | - return (int) cp_getPoints( $user_id ); |
|
101 | - } else { |
|
102 | - return wordpoints_get_points( $user_id, 'points' ); |
|
103 | - } |
|
104 | - } |
|
105 | - |
|
106 | - /** |
|
107 | - * Do the import for the points settings. |
|
108 | - * |
|
109 | - * @since 1.2.0 |
|
110 | - * |
|
111 | - * @param string $type The type of points import. |
|
112 | - */ |
|
113 | - protected function do_points_import( $type ) { |
|
114 | - |
|
115 | - $importer = new WordPoints_CubePoints_Importer( 'Test CubePoints' ); |
|
116 | - $feedback = new WordPoints_Importer_Tests_Feedback(); |
|
117 | - |
|
118 | - $importer->do_import( |
|
119 | - array( |
|
120 | - 'points' => array( |
|
121 | - $type => '1', |
|
122 | - '_data' => array( 'points_type' => 'points' ), |
|
123 | - ), |
|
124 | - ) |
|
125 | - , $feedback |
|
126 | - ); |
|
127 | - |
|
128 | - $this->assertCount( 4, $feedback->messages['info'] ); |
|
129 | - $this->assertCount( 1, $feedback->messages['success'] ); |
|
130 | - } |
|
24 | + extends WordPoints_PHPUnit_TestCase_Points { |
|
25 | + |
|
26 | + /** |
|
27 | + * The option where CubePoints stores the number of points to award for this. |
|
28 | + * |
|
29 | + * @since 1.2.0 |
|
30 | + * |
|
31 | + * @var string |
|
32 | + */ |
|
33 | + protected $cubepoints_option; |
|
34 | + |
|
35 | + /** |
|
36 | + * The type of hook being tested. |
|
37 | + * |
|
38 | + * @since 1.2.0 |
|
39 | + * |
|
40 | + * @var string |
|
41 | + */ |
|
42 | + protected $type; |
|
43 | + |
|
44 | + /** |
|
45 | + * Test that the hook behaves properly. |
|
46 | + * |
|
47 | + * @since 1.2.0 |
|
48 | + * |
|
49 | + * @param string $type The type of test. |
|
50 | + * |
|
51 | + * @dataProvider data_provider_types |
|
52 | + */ |
|
53 | + abstract public function test( $type ); |
|
54 | + |
|
55 | + /** |
|
56 | + * Data provider for types of tests. |
|
57 | + * |
|
58 | + * @since 1.2.0 |
|
59 | + * |
|
60 | + * @return array |
|
61 | + */ |
|
62 | + public function data_provider_types() { |
|
63 | + return array( |
|
64 | + 'cubepoints' => array( 'cubepoints' ), |
|
65 | + 'wordpoints' => array( 'wordpoints' ), |
|
66 | + ); |
|
67 | + } |
|
68 | + |
|
69 | + /** |
|
70 | + * Set up before a test. |
|
71 | + * |
|
72 | + * @since 1.2.0 |
|
73 | + * |
|
74 | + * @param string $type The type of test being run. |
|
75 | + */ |
|
76 | + protected function before( $type ) { |
|
77 | + |
|
78 | + update_option( 'cp_reg_points', 0 ); |
|
79 | + |
|
80 | + $this->type = $type; |
|
81 | + |
|
82 | + update_option( $this->cubepoints_option, 10 ); |
|
83 | + |
|
84 | + if ( 'wordpoints' === $this->type ) { |
|
85 | + $this->do_points_import( 'settings' ); |
|
86 | + } |
|
87 | + } |
|
88 | + |
|
89 | + /** |
|
90 | + * Get the number of points a user has. |
|
91 | + * |
|
92 | + * @since 1.2.0 |
|
93 | + * |
|
94 | + * @param int $user_id The user ID. |
|
95 | + * |
|
96 | + * @return int The number of points the user has. |
|
97 | + */ |
|
98 | + protected function get_user_points( $user_id ) { |
|
99 | + if ( 'cubepoints' === $this->type ) { |
|
100 | + return (int) cp_getPoints( $user_id ); |
|
101 | + } else { |
|
102 | + return wordpoints_get_points( $user_id, 'points' ); |
|
103 | + } |
|
104 | + } |
|
105 | + |
|
106 | + /** |
|
107 | + * Do the import for the points settings. |
|
108 | + * |
|
109 | + * @since 1.2.0 |
|
110 | + * |
|
111 | + * @param string $type The type of points import. |
|
112 | + */ |
|
113 | + protected function do_points_import( $type ) { |
|
114 | + |
|
115 | + $importer = new WordPoints_CubePoints_Importer( 'Test CubePoints' ); |
|
116 | + $feedback = new WordPoints_Importer_Tests_Feedback(); |
|
117 | + |
|
118 | + $importer->do_import( |
|
119 | + array( |
|
120 | + 'points' => array( |
|
121 | + $type => '1', |
|
122 | + '_data' => array( 'points_type' => 'points' ), |
|
123 | + ), |
|
124 | + ) |
|
125 | + , $feedback |
|
126 | + ); |
|
127 | + |
|
128 | + $this->assertCount( 4, $feedback->messages['info'] ); |
|
129 | + $this->assertCount( 1, $feedback->messages['success'] ); |
|
130 | + } |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | // EOF |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @dataProvider data_provider_types |
52 | 52 | */ |
53 | - abstract public function test( $type ); |
|
53 | + abstract public function test($type); |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * Data provider for types of tests. |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function data_provider_types() { |
63 | 63 | return array( |
64 | - 'cubepoints' => array( 'cubepoints' ), |
|
65 | - 'wordpoints' => array( 'wordpoints' ), |
|
64 | + 'cubepoints' => array('cubepoints'), |
|
65 | + 'wordpoints' => array('wordpoints'), |
|
66 | 66 | ); |
67 | 67 | } |
68 | 68 | |
@@ -73,16 +73,16 @@ discard block |
||
73 | 73 | * |
74 | 74 | * @param string $type The type of test being run. |
75 | 75 | */ |
76 | - protected function before( $type ) { |
|
76 | + protected function before($type) { |
|
77 | 77 | |
78 | - update_option( 'cp_reg_points', 0 ); |
|
78 | + update_option('cp_reg_points', 0); |
|
79 | 79 | |
80 | 80 | $this->type = $type; |
81 | 81 | |
82 | - update_option( $this->cubepoints_option, 10 ); |
|
82 | + update_option($this->cubepoints_option, 10); |
|
83 | 83 | |
84 | - if ( 'wordpoints' === $this->type ) { |
|
85 | - $this->do_points_import( 'settings' ); |
|
84 | + if ('wordpoints' === $this->type) { |
|
85 | + $this->do_points_import('settings'); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | |
@@ -95,11 +95,11 @@ discard block |
||
95 | 95 | * |
96 | 96 | * @return int The number of points the user has. |
97 | 97 | */ |
98 | - protected function get_user_points( $user_id ) { |
|
99 | - if ( 'cubepoints' === $this->type ) { |
|
100 | - return (int) cp_getPoints( $user_id ); |
|
98 | + protected function get_user_points($user_id) { |
|
99 | + if ('cubepoints' === $this->type) { |
|
100 | + return (int) cp_getPoints($user_id); |
|
101 | 101 | } else { |
102 | - return wordpoints_get_points( $user_id, 'points' ); |
|
102 | + return wordpoints_get_points($user_id, 'points'); |
|
103 | 103 | } |
104 | 104 | } |
105 | 105 | |
@@ -110,23 +110,23 @@ discard block |
||
110 | 110 | * |
111 | 111 | * @param string $type The type of points import. |
112 | 112 | */ |
113 | - protected function do_points_import( $type ) { |
|
113 | + protected function do_points_import($type) { |
|
114 | 114 | |
115 | - $importer = new WordPoints_CubePoints_Importer( 'Test CubePoints' ); |
|
115 | + $importer = new WordPoints_CubePoints_Importer('Test CubePoints'); |
|
116 | 116 | $feedback = new WordPoints_Importer_Tests_Feedback(); |
117 | 117 | |
118 | 118 | $importer->do_import( |
119 | 119 | array( |
120 | 120 | 'points' => array( |
121 | 121 | $type => '1', |
122 | - '_data' => array( 'points_type' => 'points' ), |
|
122 | + '_data' => array('points_type' => 'points'), |
|
123 | 123 | ), |
124 | 124 | ) |
125 | 125 | , $feedback |
126 | 126 | ); |
127 | 127 | |
128 | - $this->assertCount( 4, $feedback->messages['info'] ); |
|
129 | - $this->assertCount( 1, $feedback->messages['success'] ); |
|
128 | + $this->assertCount(4, $feedback->messages['info']); |
|
129 | + $this->assertCount(1, $feedback->messages['success']); |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 |
@@ -19,9 +19,9 @@ discard block |
||
19 | 19 | $loader = WordPoints_PHPUnit_Bootstrap_Loader::instance(); |
20 | 20 | $loader->add_plugin( 'cubepoints/cubepoints.php' ); |
21 | 21 | $loader->add_php_file( |
22 | - WORDPOINTS_IMPORTER_TESTS_DIR . '/includes/activate-cubepoints-components.php' |
|
23 | - , 'after' |
|
24 | - , array( 'dailypoints', 'post_author_points' ) |
|
22 | + WORDPOINTS_IMPORTER_TESTS_DIR . '/includes/activate-cubepoints-components.php' |
|
23 | + , 'after' |
|
24 | + , array( 'dailypoints', 'post_author_points' ) |
|
25 | 25 | ); |
26 | 26 | |
27 | 27 | /** |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | */ |
33 | 33 | function wordpoints_importer_tests_manually_load_module() { |
34 | 34 | |
35 | - require WORDPOINTS_IMPORTER_TESTS_DIR . '/../../src/importer.php'; |
|
36 | - require WORDPOINTS_IMPORTER_TESTS_DIR . '/../../src/admin/admin.php'; |
|
35 | + require WORDPOINTS_IMPORTER_TESTS_DIR . '/../../src/importer.php'; |
|
36 | + require WORDPOINTS_IMPORTER_TESTS_DIR . '/../../src/admin/admin.php'; |
|
37 | 37 | |
38 | - wordpoints_importer_tests_manually_load_cubepoints(); |
|
38 | + wordpoints_importer_tests_manually_load_cubepoints(); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -46,25 +46,25 @@ discard block |
||
46 | 46 | */ |
47 | 47 | function wordpoints_importer_tests_manually_load_cubepoints() { |
48 | 48 | |
49 | - require WP_PLUGIN_DIR . '/cubepoints/cubepoints.php'; |
|
49 | + require WP_PLUGIN_DIR . '/cubepoints/cubepoints.php'; |
|
50 | 50 | |
51 | - cp_activate(); |
|
51 | + cp_activate(); |
|
52 | 52 | |
53 | - // We activate these now so that they will be fully loaded. Otherwise only part |
|
54 | - // of their functions will be loaded, as the rest are defined in a conditional. |
|
55 | - // Because of some of the functions are defined outside of the conditional, there |
|
56 | - // is no way for us to load the functions later without a fatal error from |
|
57 | - // "already defined function". |
|
58 | - cp_module_activation_set( 'dailypoints', 'active' ); |
|
59 | - cp_module_activation_set( 'post_author_points', 'active' ); |
|
53 | + // We activate these now so that they will be fully loaded. Otherwise only part |
|
54 | + // of their functions will be loaded, as the rest are defined in a conditional. |
|
55 | + // Because of some of the functions are defined outside of the conditional, there |
|
56 | + // is no way for us to load the functions later without a fatal error from |
|
57 | + // "already defined function". |
|
58 | + cp_module_activation_set( 'dailypoints', 'active' ); |
|
59 | + cp_module_activation_set( 'post_author_points', 'active' ); |
|
60 | 60 | |
61 | - // We have to do this manually here after WordPress 4.7. |
|
62 | - // https://core.trac.wordpress.org/ticket/38011#comment:3 |
|
63 | - global $wp_version; |
|
61 | + // We have to do this manually here after WordPress 4.7. |
|
62 | + // https://core.trac.wordpress.org/ticket/38011#comment:3 |
|
63 | + global $wp_version; |
|
64 | 64 | |
65 | - if ( version_compare( $wp_version, '4.6', '>' ) ) { |
|
66 | - cp_modules_include(); |
|
67 | - } |
|
65 | + if ( version_compare( $wp_version, '4.6', '>' ) ) { |
|
66 | + cp_modules_include(); |
|
67 | + } |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | // EOF |
@@ -14,14 +14,14 @@ discard block |
||
14 | 14 | * |
15 | 15 | * @type string |
16 | 16 | */ |
17 | -define( 'WORDPOINTS_IMPORTER_TESTS_DIR', dirname( dirname( __FILE__ ) ) ); |
|
17 | +define('WORDPOINTS_IMPORTER_TESTS_DIR', dirname(dirname(__FILE__))); |
|
18 | 18 | |
19 | 19 | $loader = WordPoints_PHPUnit_Bootstrap_Loader::instance(); |
20 | -$loader->add_plugin( 'cubepoints/cubepoints.php' ); |
|
20 | +$loader->add_plugin('cubepoints/cubepoints.php'); |
|
21 | 21 | $loader->add_php_file( |
22 | - WORDPOINTS_IMPORTER_TESTS_DIR . '/includes/activate-cubepoints-components.php' |
|
22 | + WORDPOINTS_IMPORTER_TESTS_DIR.'/includes/activate-cubepoints-components.php' |
|
23 | 23 | , 'after' |
24 | - , array( 'dailypoints', 'post_author_points' ) |
|
24 | + , array('dailypoints', 'post_author_points') |
|
25 | 25 | ); |
26 | 26 | |
27 | 27 | /** |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | */ |
33 | 33 | function wordpoints_importer_tests_manually_load_module() { |
34 | 34 | |
35 | - require WORDPOINTS_IMPORTER_TESTS_DIR . '/../../src/importer.php'; |
|
36 | - require WORDPOINTS_IMPORTER_TESTS_DIR . '/../../src/admin/admin.php'; |
|
35 | + require WORDPOINTS_IMPORTER_TESTS_DIR.'/../../src/importer.php'; |
|
36 | + require WORDPOINTS_IMPORTER_TESTS_DIR.'/../../src/admin/admin.php'; |
|
37 | 37 | |
38 | 38 | wordpoints_importer_tests_manually_load_cubepoints(); |
39 | 39 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | function wordpoints_importer_tests_manually_load_cubepoints() { |
48 | 48 | |
49 | - require WP_PLUGIN_DIR . '/cubepoints/cubepoints.php'; |
|
49 | + require WP_PLUGIN_DIR.'/cubepoints/cubepoints.php'; |
|
50 | 50 | |
51 | 51 | cp_activate(); |
52 | 52 | |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | // Because of some of the functions are defined outside of the conditional, there |
56 | 56 | // is no way for us to load the functions later without a fatal error from |
57 | 57 | // "already defined function". |
58 | - cp_module_activation_set( 'dailypoints', 'active' ); |
|
59 | - cp_module_activation_set( 'post_author_points', 'active' ); |
|
58 | + cp_module_activation_set('dailypoints', 'active'); |
|
59 | + cp_module_activation_set('post_author_points', 'active'); |
|
60 | 60 | |
61 | 61 | // We have to do this manually here after WordPress 4.7. |
62 | 62 | // https://core.trac.wordpress.org/ticket/38011#comment:3 |
63 | 63 | global $wp_version; |
64 | 64 | |
65 | - if ( version_compare( $wp_version, '4.6', '>' ) ) { |
|
65 | + if (version_compare($wp_version, '4.6', '>')) { |
|
66 | 66 | cp_modules_include(); |
67 | 67 | } |
68 | 68 | } |
@@ -12,27 +12,27 @@ |
||
12 | 12 | * |
13 | 13 | * @since 1.2.1 |
14 | 14 | */ |
15 | -require_once WORDPOINTS_IMPORTER_TESTS_DIR . '/../../src/admin/admin.php'; |
|
15 | +require_once WORDPOINTS_IMPORTER_TESTS_DIR.'/../../src/admin/admin.php'; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Feedback object used in the tests. |
19 | 19 | * |
20 | 20 | * @since 1.0.0 |
21 | 21 | */ |
22 | -require_once WORDPOINTS_IMPORTER_TESTS_DIR . '/includes/feedback.php'; |
|
22 | +require_once WORDPOINTS_IMPORTER_TESTS_DIR.'/includes/feedback.php'; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * Mocks used in the tests. |
26 | 26 | * |
27 | 27 | * @since 1.0.0 |
28 | 28 | */ |
29 | -require_once WORDPOINTS_IMPORTER_TESTS_DIR . '/includes/mocks.php'; |
|
29 | +require_once WORDPOINTS_IMPORTER_TESTS_DIR.'/includes/mocks.php'; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Testcase for testing hooks. |
33 | 33 | * |
34 | 34 | * @since 1.2.0 |
35 | 35 | */ |
36 | -require_once WORDPOINTS_IMPORTER_TESTS_DIR . '/includes/testcases/hook.php'; |
|
36 | +require_once WORDPOINTS_IMPORTER_TESTS_DIR.'/includes/testcases/hook.php'; |
|
37 | 37 | |
38 | 38 | // EOF |