projects/plugins/jetpack/tests/php/_inc/lib/test_class.rest-api-authentication.php 1 location
|
@@ 356-362 (lines=7) @@
|
| 353 |
|
$this->assertEquals( self::$admin_id, get_current_user_id() ); |
| 354 |
|
} |
| 355 |
|
|
| 356 |
|
public function mock_jetpack_private_options( $value, $option_name ) { |
| 357 |
|
$user_tokens = array(); |
| 358 |
|
$user_tokens[ self::$admin_id ] = 'pretend_this_is_valid.secret.' . self::$admin_id; |
| 359 |
|
return array( |
| 360 |
|
'user_tokens' => $user_tokens, |
| 361 |
|
); |
| 362 |
|
} |
| 363 |
|
|
| 364 |
|
/** |
| 365 |
|
* Ensures that these tests pass through Jetpack::wp_rest_authenticate, |
projects/plugins/jetpack/tests/php/modules/post-by-email/test-class.post-by-email-api.php 1 location
|
@@ 180-187 (lines=8) @@
|
| 177 |
|
* |
| 178 |
|
* @return array |
| 179 |
|
*/ |
| 180 |
|
public function mock_jetpack_private_options() { |
| 181 |
|
$user_tokens = array(); |
| 182 |
|
$user_tokens[ self::$admin_id ] = 'pretend_this_is_valid.secret.' . self::$admin_id; |
| 183 |
|
|
| 184 |
|
return array( |
| 185 |
|
'user_tokens' => $user_tokens, |
| 186 |
|
); |
| 187 |
|
} |
| 188 |
|
|
| 189 |
|
/** |
| 190 |
|
* Ensures that these tests pass through Jetpack::wp_rest_authenticate, |
projects/plugins/jetpack/tests/php/sync/test_class.jetpack-sync-callables.php 1 location
|
@@ 1116-1122 (lines=7) @@
|
| 1113 |
|
/** |
| 1114 |
|
* Mock Jetpack private options. |
| 1115 |
|
*/ |
| 1116 |
|
public function mock_jetpack_private_options() { |
| 1117 |
|
$user_tokens = array(); |
| 1118 |
|
$user_tokens[ self::$admin_id ] = 'pretend_this_is_valid.secret.' . self::$admin_id; |
| 1119 |
|
return array( |
| 1120 |
|
'user_tokens' => $user_tokens, |
| 1121 |
|
); |
| 1122 |
|
} |
| 1123 |
|
|
| 1124 |
|
/** |
| 1125 |
|
* Test "get_timezone_from_timezone_string". |