@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | , $feedback |
32 | 32 | ); |
33 | 33 | |
34 | - $this->assertFalse( $valid ); |
|
35 | - $this->assertCount( 1, $feedback->messages['warning'] ); |
|
34 | + $this->assertFalse($valid); |
|
35 | + $this->assertCount(1, $feedback->messages['warning']); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | |
49 | 49 | $valid = wordpoints_importer_validate_points_type_setting( |
50 | 50 | true |
51 | - , array( 'points_type' => 'invalid' ) |
|
51 | + , array('points_type' => 'invalid') |
|
52 | 52 | , $feedback |
53 | 53 | ); |
54 | 54 | |
55 | - $this->assertFalse( $valid ); |
|
56 | - $this->assertCount( 1, $feedback->messages['warning'] ); |
|
55 | + $this->assertFalse($valid); |
|
56 | + $this->assertCount(1, $feedback->messages['warning']); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | |
70 | 70 | $valid = wordpoints_importer_validate_points_type_setting( |
71 | 71 | true |
72 | - , array( 'points_type' => 'points' ) |
|
72 | + , array('points_type' => 'points') |
|
73 | 73 | , $feedback |
74 | 74 | ); |
75 | 75 | |
76 | - $this->assertTrue( $valid ); |
|
77 | - $this->assertEmpty( $feedback->messages ); |
|
76 | + $this->assertTrue($valid); |
|
77 | + $this->assertEmpty($feedback->messages); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -90,12 +90,12 @@ discard block |
||
90 | 90 | |
91 | 91 | $valid = wordpoints_importer_validate_points_type_setting( |
92 | 92 | false |
93 | - , array( 'points_type' => 'points' ) |
|
93 | + , array('points_type' => 'points') |
|
94 | 94 | , $feedback |
95 | 95 | ); |
96 | 96 | |
97 | - $this->assertFalse( $valid ); |
|
98 | - $this->assertEmpty( $feedback->messages ); |
|
97 | + $this->assertFalse($valid); |
|
98 | + $this->assertEmpty($feedback->messages); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | , $feedback |
118 | 118 | ); |
119 | 119 | |
120 | - $this->assertFalse( $valid ); |
|
121 | - $this->assertCount( 1, $feedback->messages['warning'] ); |
|
120 | + $this->assertFalse($valid); |
|
121 | + $this->assertCount(1, $feedback->messages['warning']); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -136,12 +136,12 @@ discard block |
||
136 | 136 | |
137 | 137 | $valid = wordpoints_importer_validate_rank_group_setting( |
138 | 138 | true |
139 | - , array( 'rank_group' => 'invalid' ) |
|
139 | + , array('rank_group' => 'invalid') |
|
140 | 140 | , $feedback |
141 | 141 | ); |
142 | 142 | |
143 | - $this->assertFalse( $valid ); |
|
144 | - $this->assertCount( 1, $feedback->messages['warning'] ); |
|
143 | + $this->assertFalse($valid); |
|
144 | + $this->assertCount(1, $feedback->messages['warning']); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
@@ -159,12 +159,12 @@ discard block |
||
159 | 159 | |
160 | 160 | $valid = wordpoints_importer_validate_rank_group_setting( |
161 | 161 | true |
162 | - , array( 'rank_group' => 'points_type-points' ) |
|
162 | + , array('rank_group' => 'points_type-points') |
|
163 | 163 | , $feedback |
164 | 164 | ); |
165 | 165 | |
166 | - $this->assertTrue( $valid ); |
|
167 | - $this->assertEmpty( $feedback->messages ); |
|
166 | + $this->assertTrue($valid); |
|
167 | + $this->assertEmpty($feedback->messages); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
@@ -182,12 +182,12 @@ discard block |
||
182 | 182 | |
183 | 183 | $valid = wordpoints_importer_validate_rank_group_setting( |
184 | 184 | false |
185 | - , array( 'rank_group' => 'points_type-points' ) |
|
185 | + , array('rank_group' => 'points_type-points') |
|
186 | 186 | , $feedback |
187 | 187 | ); |
188 | 188 | |
189 | - $this->assertFalse( $valid ); |
|
190 | - $this->assertEmpty( $feedback->messages ); |
|
189 | + $this->assertFalse($valid); |
|
190 | + $this->assertEmpty($feedback->messages); |
|
191 | 191 | } |
192 | 192 | } |
193 | 193 |
@@ -30,24 +30,24 @@ |
||
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 | 37 | $user_id = $this->factory->user->create(); |
38 | 38 | $post_id = $this->factory->post->create( |
39 | - array( 'post_author' => $user_id, 'post_status' => 'publish' ) |
|
39 | + array('post_author' => $user_id, 'post_status' => 'publish') |
|
40 | 40 | ); |
41 | 41 | |
42 | - $this->assertEquals( 10, $this->get_user_points( $user_id ) ); |
|
42 | + $this->assertEquals(10, $this->get_user_points($user_id)); |
|
43 | 43 | |
44 | - wp_update_post( array( 'ID' => $post_id, 'post_status' => 'draft' ) ); |
|
44 | + wp_update_post(array('ID' => $post_id, 'post_status' => 'draft')); |
|
45 | 45 | |
46 | - $this->assertEquals( 10, $this->get_user_points( $user_id ) ); |
|
46 | + $this->assertEquals(10, $this->get_user_points($user_id)); |
|
47 | 47 | |
48 | - wp_delete_post( $post_id, true ); |
|
48 | + wp_delete_post($post_id, true); |
|
49 | 49 | |
50 | - $this->assertEquals( 10, $this->get_user_points( $user_id ) ); |
|
50 | + $this->assertEquals(10, $this->get_user_points($user_id)); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 |
@@ -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->assertEquals( 0, $this->get_user_points( $user_id ) ); |
|
52 | + $this->assertEquals(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->assertEquals( 10, $this->get_user_points( $user_id ) ); |
|
58 | + $this->assertEquals(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->assertEquals( 0, $this->get_user_points( $user_id ) ); |
|
64 | + $this->assertEquals(0, $this->get_user_points($user_id)); |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 |
@@ -30,17 +30,17 @@ 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 | - cp_module_activation_set( 'post_author_points', 'active' ); |
|
35 | + cp_module_activation_set('post_author_points', 'active'); |
|
36 | 36 | |
37 | - update_option( 'cp_post_points', 0 ); |
|
37 | + update_option('cp_post_points', 0); |
|
38 | 38 | |
39 | - $this->before( $type ); |
|
39 | + $this->before($type); |
|
40 | 40 | |
41 | 41 | $user_id = $this->factory->user->create(); |
42 | 42 | $post_id = $this->factory->post->create( |
43 | - array( 'post_author' => $user_id ) |
|
43 | + array('post_author' => $user_id) |
|
44 | 44 | ); |
45 | 45 | |
46 | 46 | $comment_id = $this->factory->comment->create( |
@@ -51,19 +51,19 @@ discard block |
||
51 | 51 | ) |
52 | 52 | ); |
53 | 53 | |
54 | - $this->assertEquals( 0, $this->get_user_points( $user_id ) ); |
|
54 | + $this->assertEquals(0, $this->get_user_points($user_id)); |
|
55 | 55 | |
56 | 56 | wp_update_comment( |
57 | - array( 'comment_ID' => $comment_id, 'comment_approved' => 1 ) |
|
57 | + array('comment_ID' => $comment_id, 'comment_approved' => 1) |
|
58 | 58 | ); |
59 | 59 | |
60 | - $this->assertEquals( 10, $this->get_user_points( $user_id ) ); |
|
60 | + $this->assertEquals(10, $this->get_user_points($user_id)); |
|
61 | 61 | |
62 | 62 | wp_update_comment( |
63 | - array( 'comment_ID' => $comment_id, 'comment_approved' => 0 ) |
|
63 | + array('comment_ID' => $comment_id, 'comment_approved' => 0) |
|
64 | 64 | ); |
65 | 65 | |
66 | - $this->assertEquals( 0, $this->get_user_points( $user_id ) ); |
|
66 | + $this->assertEquals(0, $this->get_user_points($user_id)); |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 |
@@ -30,17 +30,17 @@ |
||
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 | 37 | $user_id = $this->factory->user->create(); |
38 | 38 | |
39 | - $this->assertEquals( 10, $this->get_user_points( $user_id ) ); |
|
39 | + $this->assertEquals(10, $this->get_user_points($user_id)); |
|
40 | 40 | |
41 | - self::delete_user( $user_id ); |
|
41 | + self::delete_user($user_id); |
|
42 | 42 | |
43 | - $this->assertEquals( 0, $this->get_user_points( $user_id ) ); |
|
43 | + $this->assertEquals(0, $this->get_user_points($user_id)); |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 |
@@ -41,13 +41,13 @@ discard block |
||
41 | 41 | |
42 | 42 | parent::setUp(); |
43 | 43 | |
44 | - $this->importer = new WordPoints_Importer_Mock( 'Mock' ); |
|
44 | + $this->importer = new WordPoints_Importer_Mock('Mock'); |
|
45 | 45 | $this->importer->components = array( |
46 | 46 | 'points' => array( |
47 | 47 | 'user_points' => array( |
48 | 48 | 'label' => 'User points', |
49 | - 'function' => array( $this->importer, 'do_an_import' ), |
|
50 | - 'can_import' => array( $this->importer, 'can_import' ), |
|
49 | + 'function' => array($this->importer, 'do_an_import'), |
|
50 | + 'can_import' => array($this->importer, 'can_import'), |
|
51 | 51 | ), |
52 | 52 | ), |
53 | 53 | ); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function test_supports_supported_component() { |
71 | 71 | |
72 | - $this->assertTrue( $this->importer->supports_component( 'points' ) ); |
|
72 | + $this->assertTrue($this->importer->supports_component('points')); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function test_supports_unsupported_component() { |
83 | 83 | |
84 | - $this->assertFalse( $this->importer->supports_component( 'unsupported' ) ); |
|
84 | + $this->assertFalse($this->importer->supports_component('unsupported')); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | $this->assertEquals( |
97 | 97 | $this->importer_components['points'] |
98 | - , $this->importer->get_options_for_component( 'points' ) |
|
98 | + , $this->importer->get_options_for_component('points') |
|
99 | 99 | ); |
100 | 100 | } |
101 | 101 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | $this->assertEquals( |
112 | 112 | array() |
113 | - , $this->importer->get_options_for_component( 'unsupported' ) |
|
113 | + , $this->importer->get_options_for_component('unsupported') |
|
114 | 114 | ); |
115 | 115 | } |
116 | 116 | |
@@ -124,19 +124,19 @@ discard block |
||
124 | 124 | public function test_do_import_not_installed() { |
125 | 125 | |
126 | 126 | $this->importer->components = array( |
127 | - 'uninstalled' => array( 'method' => 'do_an_import' ), |
|
127 | + 'uninstalled' => array('method' => 'do_an_import'), |
|
128 | 128 | ); |
129 | 129 | |
130 | 130 | $feedback = new WordPoints_Importer_Tests_Feedback(); |
131 | 131 | $this->importer->do_import( |
132 | - array( 'uninstalled' => array( 'do' => 'yes' ) ) |
|
132 | + array('uninstalled' => array('do' => 'yes')) |
|
133 | 133 | , $feedback |
134 | 134 | ); |
135 | 135 | |
136 | - $this->assertCount( 1, $feedback->messages['warning'] ); |
|
136 | + $this->assertCount(1, $feedback->messages['warning']); |
|
137 | 137 | |
138 | 138 | // The import shouldn't have been performed. |
139 | - $this->assertEmpty( $this->importer->imports ); |
|
139 | + $this->assertEmpty($this->importer->imports); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
@@ -152,14 +152,14 @@ discard block |
||
152 | 152 | |
153 | 153 | $feedback = new WordPoints_Importer_Tests_Feedback(); |
154 | 154 | $this->importer->do_import( |
155 | - array( 'points' => array( 'do' => 'yes' ) ) |
|
155 | + array('points' => array('do' => 'yes')) |
|
156 | 156 | , $feedback |
157 | 157 | ); |
158 | 158 | |
159 | - $this->assertCount( 1, $feedback->messages['warning'] ); |
|
159 | + $this->assertCount(1, $feedback->messages['warning']); |
|
160 | 160 | |
161 | 161 | // The import shouldn't have been performed. |
162 | - $this->assertEmpty( $this->importer->imports ); |
|
162 | + $this->assertEmpty($this->importer->imports); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
@@ -171,22 +171,22 @@ discard block |
||
171 | 171 | */ |
172 | 172 | public function test_do_import_validates_settings() { |
173 | 173 | |
174 | - $this->listen_for_filter( 'wordpoints_import_settings_valid-points' ); |
|
174 | + $this->listen_for_filter('wordpoints_import_settings_valid-points'); |
|
175 | 175 | |
176 | - add_filter( 'wordpoints_import_settings_valid-points', '__return_false' ); |
|
176 | + add_filter('wordpoints_import_settings_valid-points', '__return_false'); |
|
177 | 177 | |
178 | 178 | $this->importer->do_import( |
179 | - array( 'points' => array( 'do' => 'yes' ) ) |
|
179 | + array('points' => array('do' => 'yes')) |
|
180 | 180 | , new WordPoints_Importer_Tests_Feedback() |
181 | 181 | ); |
182 | 182 | |
183 | 183 | $this->assertEquals( |
184 | 184 | 1 |
185 | - , $this->filter_was_called( 'wordpoints_import_settings_valid-points' ) |
|
185 | + , $this->filter_was_called('wordpoints_import_settings_valid-points') |
|
186 | 186 | ); |
187 | 187 | |
188 | 188 | // The import shouldn't have been performed. |
189 | - $this->assertEmpty( $this->importer->imports ); |
|
189 | + $this->assertEmpty($this->importer->imports); |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
@@ -201,14 +201,14 @@ discard block |
||
201 | 201 | $feedback = new WordPoints_Importer_Tests_Feedback(); |
202 | 202 | |
203 | 203 | $this->importer->do_import( |
204 | - array( 'points' => array( 'do' => 'yes' ) ) |
|
204 | + array('points' => array('do' => 'yes')) |
|
205 | 205 | , $feedback |
206 | 206 | ); |
207 | 207 | |
208 | - $this->assertCount( 1, $feedback->messages['warning'] ); |
|
208 | + $this->assertCount(1, $feedback->messages['warning']); |
|
209 | 209 | |
210 | 210 | // The import shouldn't have been performed. |
211 | - $this->assertEmpty( $this->importer->imports ); |
|
211 | + $this->assertEmpty($this->importer->imports); |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |
@@ -223,18 +223,18 @@ discard block |
||
223 | 223 | $feedback = new WordPoints_Importer_Tests_Feedback(); |
224 | 224 | |
225 | 225 | $this->importer->components['points']['user_points']['can_import'] = |
226 | - array( $this->importer, 'cant_import' ); |
|
226 | + array($this->importer, 'cant_import'); |
|
227 | 227 | |
228 | 228 | $this->importer->do_import( |
229 | - array( 'points' => array( 'user_points' => '1' ) ) |
|
229 | + array('points' => array('user_points' => '1')) |
|
230 | 230 | , $feedback |
231 | 231 | ); |
232 | 232 | |
233 | - $this->assertCount( 1, $this->importer->can_imports ); |
|
234 | - $this->assertCount( 1, $feedback->messages['warning'] ); |
|
233 | + $this->assertCount(1, $this->importer->can_imports); |
|
234 | + $this->assertCount(1, $feedback->messages['warning']); |
|
235 | 235 | |
236 | 236 | // The import shouldn't have been performed. |
237 | - $this->assertEmpty( $this->importer->imports ); |
|
237 | + $this->assertEmpty($this->importer->imports); |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | /** |
@@ -250,15 +250,15 @@ discard block |
||
250 | 250 | array( |
251 | 251 | 'points' => array( |
252 | 252 | 'user_points' => '1', |
253 | - '_data' => array( 'testing' => 1 ), |
|
253 | + '_data' => array('testing' => 1), |
|
254 | 254 | ), |
255 | 255 | ) |
256 | 256 | , new WordPoints_Importer_Tests_Feedback() |
257 | 257 | ); |
258 | 258 | |
259 | - $this->assertCount( 1, $this->importer->can_imports ); |
|
259 | + $this->assertCount(1, $this->importer->can_imports); |
|
260 | 260 | $this->assertEquals( |
261 | - array( 'testing' => 1 ) |
|
261 | + array('testing' => 1) |
|
262 | 262 | , $this->importer->can_imports[0] |
263 | 263 | ); |
264 | 264 | } |
@@ -273,11 +273,11 @@ discard block |
||
273 | 273 | public function test_do_import() { |
274 | 274 | |
275 | 275 | $this->importer->do_import( |
276 | - array( 'points' => array( 'user_points' => '1' ) ) |
|
276 | + array('points' => array('user_points' => '1')) |
|
277 | 277 | , new WordPoints_Importer_Tests_Feedback() |
278 | 278 | ); |
279 | 279 | |
280 | - $this->assertCount( 1, $this->importer->imports ); |
|
280 | + $this->assertCount(1, $this->importer->imports); |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | /** |
@@ -293,15 +293,15 @@ discard block |
||
293 | 293 | array( |
294 | 294 | 'points' => array( |
295 | 295 | 'user_points' => '1', |
296 | - '_data' => array( 'testing' => 1 ), |
|
296 | + '_data' => array('testing' => 1), |
|
297 | 297 | ), |
298 | 298 | ) |
299 | 299 | , new WordPoints_Importer_Tests_Feedback() |
300 | 300 | ); |
301 | 301 | |
302 | - $this->assertCount( 1, $this->importer->imports ); |
|
302 | + $this->assertCount(1, $this->importer->imports); |
|
303 | 303 | $this->assertEquals( |
304 | - array( 'testing' => 1 ) |
|
304 | + array('testing' => 1) |
|
305 | 305 | , $this->importer->imports[0] |
306 | 306 | ); |
307 | 307 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | WordPoints_Importers::register( |
38 | 38 | 'test' |
39 | - , array( 'class' => 'WordPoints_Importer_Mock', 'name' => 'Test' ) |
|
39 | + , array('class' => 'WordPoints_Importer_Mock', 'name' => 'Test') |
|
40 | 40 | ); |
41 | 41 | |
42 | 42 | } |
@@ -48,17 +48,17 @@ discard block |
||
48 | 48 | |
49 | 49 | $importers = WordPoints_Importers::get(); |
50 | 50 | |
51 | - foreach ( $this->_backup_importers as $slug => $args ) { |
|
51 | + foreach ($this->_backup_importers as $slug => $args) { |
|
52 | 52 | |
53 | - if ( ! isset( $importers[ $slug ] ) ) { |
|
54 | - WordPoints_Importers::register( $slug, $args ); |
|
53 | + if (!isset($importers[$slug])) { |
|
54 | + WordPoints_Importers::register($slug, $args); |
|
55 | 55 | } |
56 | 56 | |
57 | - unset( $importers[ $slug ] ); |
|
57 | + unset($importers[$slug]); |
|
58 | 58 | } |
59 | 59 | |
60 | - foreach ( $importers as $slug => $args ) { |
|
61 | - WordPoints_Importers::deregister( $slug ); |
|
60 | + foreach ($importers as $slug => $args) { |
|
61 | + WordPoints_Importers::deregister($slug); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | parent::tearDown(); |
@@ -76,14 +76,14 @@ discard block |
||
76 | 76 | |
77 | 77 | WordPoints_Importers::register( |
78 | 78 | __METHOD__ |
79 | - , array( 'class' => 'WordPoints_Importer_Mock', 'name' => 'Test' ) |
|
79 | + , array('class' => 'WordPoints_Importer_Mock', 'name' => 'Test') |
|
80 | 80 | ); |
81 | 81 | |
82 | 82 | $importers = WordPoints_Importers::get(); |
83 | 83 | |
84 | - $this->assertArrayHasKey( 'test', $importers ); |
|
84 | + $this->assertArrayHasKey('test', $importers); |
|
85 | 85 | $this->assertEquals( |
86 | - array( 'class' => 'WordPoints_Importer_Mock', 'name' => 'Test' ) |
|
86 | + array('class' => 'WordPoints_Importer_Mock', 'name' => 'Test') |
|
87 | 87 | , $importers['test'] |
88 | 88 | ); |
89 | 89 | } |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function test_deregister() { |
100 | 100 | |
101 | - WordPoints_Importers::deregister( 'test' ); |
|
101 | + WordPoints_Importers::deregister('test'); |
|
102 | 102 | |
103 | 103 | $importers = WordPoints_Importers::get(); |
104 | 104 | |
105 | - $this->assertArrayNotHasKey( 'test', $importers ); |
|
105 | + $this->assertArrayNotHasKey('test', $importers); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function test_is_registered() { |
116 | 116 | |
117 | - $this->assertTrue( WordPoints_Importers::is_registered( 'test' ) ); |
|
117 | + $this->assertTrue(WordPoints_Importers::is_registered('test')); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
@@ -126,9 +126,9 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function test_is_registered_unregistered() { |
128 | 128 | |
129 | - WordPoints_Importers::deregister( 'test' ); |
|
129 | + WordPoints_Importers::deregister('test'); |
|
130 | 130 | |
131 | - $this->assertFalse( WordPoints_Importers::is_registered( 'test' ) ); |
|
131 | + $this->assertFalse(WordPoints_Importers::is_registered('test')); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | /** |
@@ -140,9 +140,9 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function test_get_unregistered_importer() { |
142 | 142 | |
143 | - WordPoints_Importers::deregister( 'test' ); |
|
143 | + WordPoints_Importers::deregister('test'); |
|
144 | 144 | |
145 | - $this->assertFalse( WordPoints_Importers::get_importer( 'test' ) ); |
|
145 | + $this->assertFalse(WordPoints_Importers::get_importer('test')); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | $this->assertInstanceOf( |
158 | 158 | 'WordPoints_Importer_Mock' |
159 | - , WordPoints_Importers::get_importer( 'test' ) |
|
159 | + , WordPoints_Importers::get_importer('test') |
|
160 | 160 | ); |
161 | 161 | } |
162 | 162 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * |
61 | 61 | * @param array $settings The settings for this "component". |
62 | 62 | */ |
63 | - public function do_an_import( $settings ) { |
|
63 | + public function do_an_import($settings) { |
|
64 | 64 | |
65 | 65 | $this->imports[] = $settings; |
66 | 66 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * |
75 | 75 | * @return true |
76 | 76 | */ |
77 | - public function can_import( $settings ) { |
|
77 | + public function can_import($settings) { |
|
78 | 78 | |
79 | 79 | $this->can_imports[] = $settings; |
80 | 80 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * |
91 | 91 | * @return WP_Error An error. |
92 | 92 | */ |
93 | - public function cant_import( $settings ) { |
|
93 | + public function cant_import($settings) { |
|
94 | 94 | |
95 | 95 | $this->can_imports[] = $settings; |
96 | 96 |
@@ -26,9 +26,9 @@ |
||
26 | 26 | /** |
27 | 27 | * @since 1.0.0 |
28 | 28 | */ |
29 | - protected function _send( $message, $type = 'info' ) { |
|
29 | + protected function _send($message, $type = 'info') { |
|
30 | 30 | |
31 | - $this->messages[ $type ][] = $message; |
|
31 | + $this->messages[$type][] = $message; |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 |