本文整理汇总了PHP中Phake::never方法的典型用法代码示例。如果您正苦于以下问题:PHP Phake::never方法的具体用法?PHP Phake::never怎么用?PHP Phake::never使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phake
的用法示例。
在下文中一共展示了Phake::never方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testFindInTrans
public function testFindInTrans()
{
$this->target->begin();
$this->target->find('hoge', 'ssd', array('a', 'b', 3), 'fuga');
\Phake::verify($this->write)->find('hoge', 'ssd', array('a', 'b', 3), 'fuga');
\Phake::verify($this->read, \Phake::never())->find('hoge', 'ssd', array('a', 'b', 3), 'fuga');
}
示例2: test_does_not_update_option_when_check_option_returns_errors
public function test_does_not_update_option_when_check_option_returns_errors()
{
$_POST['nonce'] = 'not empty';
Phake::when($this->admin)->check_option(Phake::anyParameters())->thenReturn(array(array(), array('error')));
$this->wizard->wizard_submit_ajax();
Phake::verify($this->facade, Phake::never())->update_option(Phake::anyParameters());
}
开发者ID:ThemeSurgeon,项目名称:launchkey-wordpress,代码行数:7,代码来源:class-launchkey-wp-configuration-wizard-submit-ajax-callback-test.php
示例3: test_enqueue_verifier_native_script_does_not_enqueue_script_if_user_cannot_manage_options
public function test_enqueue_verifier_native_script_does_not_enqueue_script_if_user_cannot_manage_options()
{
Phake::when($this->facade)->current_user_can('manage_options')->thenReturn(false);
$this->wizard->enqueue_verify_configuration_script();
Phake::verify($this->facade)->current_user_can('manage_options');
Phake::verify($this->facade, Phake::never())->wp_enqueue_script(Phake::anyParameters());
}
开发者ID:anthony-dandrea,项目名称:launchkey-wordpress,代码行数:7,代码来源:class-launchkey-wp-configuration-wizard-test.php
示例4: test_when_authenticate_throws_exception_it_does_not_log_when_not_debug
public function test_when_authenticate_throws_exception_it_does_not_log_when_not_debug()
{
Phake::when($this->facade)->is_debug_log()->thenReturn(false);
Phake::when($this->sdk_auth)->authenticate(Phake::anyParameters())->thenThrow(new Exception());
$this->client->launchkey_user_authentication('user', 'username');
Phake::verify($this->facade, Phake::never())->error_log(Phake::anyParameters());
}
开发者ID:ThemeSurgeon,项目名称:launchkey-wordpress,代码行数:7,代码来源:class-launchkey-wp-native-client-authenticate-user-test.php
示例5: testExecuteNoResultNoParameter
public function testExecuteNoResultNoParameter()
{
\Phake::when($this->target)->getAffectedRows()->thenReturn(0);
\Phake::when($this->connection)->prepare('DROP TABLE')->thenReturn($this->statement);
$this->target->executeNoResult('DROP TABLE');
\Phake::verify($this->statement, \Phake::never())->bind_param(\Phake::anyParameters());
\Phake::verify($this->statement)->close();
}
示例6: test_does_not_logoout_or_redirect_if_user_authed_with_launchkey_and_still_authenticated
/**
* @depends test_gets_the_current_user_and_checks_their_status
*/
public function test_does_not_logoout_or_redirect_if_user_authed_with_launchkey_and_still_authenticated()
{
Phake::when($this->facade)->is_user_logged_in()->thenReturn(true);
Phake::when($this->wpdb)->get_var(Phake::anyParameters())->thenReturn('true');
$this->client->launchkey_still_authenticated_heartbeat();
Phake::verify($this->facade, Phake::never())->update_user_meta(Phake::anyParameters());
Phake::verify($this->facade, Phake::never())->wp_logout(Phake::anyParameters());
}
开发者ID:ThemeSurgeon,项目名称:launchkey-wordpress,代码行数:11,代码来源:class-launchkey-wp-native-client-still-authenticated-heartbeat-test.php
示例7: test_exceptions_do_not_log_when_not_debug
public function test_exceptions_do_not_log_when_not_debug()
{
$this->user->launchkey_auth = 'auth_request_id';
Phake::when($this->facade)->is_debug_log()->thenReturn(false);
Phake::when($this->sdk_auth)->deOrbit(Phake::anyParameters())->thenThrow(new Exception());
$this->client->logout();
Phake::verify($this->facade, Phake::never())->error_log(Phake::anyParameters());
}
开发者ID:aenglander,项目名称:launchkey-wordpress,代码行数:8,代码来源:class-launchkey-wp-native-client-logout-test.php
示例8:
public function test_non_login_with_loggedin_user_that_is_paired_and_was_authorized_by_launchkey_does_nothing_when_authenticated_is_true()
{
Phake::when($this->facade)->wp_get_current_user(Phake::anyParameters())->thenReturn($this->user);
$this->user->launchkey_username = 'launchkey username';
$this->user->launchkey_authorized = 'true';
$this->client->authentication_controller(null, null, null);
Phake::verify($this->facade, Phake::never())->remove_all_filters(Phake::anyParameters());
Phake::verify($this->facade, Phake::never())->add_filter(Phake::anyParameters());
Phake::verify($this->facade, Phake::never())->wp_logout(Phake::anyParameters());
}
开发者ID:aenglander,项目名称:launchkey-wordpress,代码行数:10,代码来源:class-launchkey-wp-native-client-authentication-controller-test.php
示例9: test_does_not_update_user_meta_on_authorize_exception
public function test_does_not_update_user_meta_on_authorize_exception()
{
$_SERVER['REQUEST_METHOD'] = 'POST';
$_POST['username'] = 'expected';
$_REQUEST['nonce'] = 'not empty';
Phake::when($this->auth)->authorize(Phake::anyParameters())->thenThrow(new Exception());
$this->wizard->verify_configuration_callback();
Phake::verify($this->facade, Phake::never())->update_user_meta(Phake::anyParameters());
}
开发者ID:ThemeSurgeon,项目名称:launchkey-wordpress,代码行数:9,代码来源:class-launchkey-wp-configuration-wizard-verify-configuration-callback-test.php
示例10: testShouldNotBindEventListenerWhenJsonFormatOptionIsFalse
public function testShouldNotBindEventListenerWhenJsonFormatOptionIsFalse()
{
$builder = \Phake::mock('Symfony\\Component\\Form\\FormBuilderInterface');
$this->formTypeJsonExtension->buildForm($builder, ['json_format' => false]);
\Phake::verify($builder, \Phake::never())->addEventSubscriber(new JsonExtensionListener());
}
示例11: test_register_actions_does_not_register_admin_actions_when_not_admin
/**
* @dataProvider provider_admin_actions
*
* @param $action
* @param $callback
*/
public function test_register_actions_does_not_register_admin_actions_when_not_admin($action, $callback)
{
Phake::when($this->facade)->is_admin()->thenReturn(false);
$this->client->register_actions();
Phake::verify($this->facade, Phake::never())->add_action($action, array($this->client, $callback));
}
示例12: test_launchkey_admin_callback_admin_pair_does_nothing_when_launchkey_user_cookie_is_set_but_not_valid
public function test_launchkey_admin_callback_admin_pair_does_nothing_when_launchkey_user_cookie_is_set_but_not_valid()
{
$_GET['launchkey_admin_pair'] = '1';
$_COOKIE['launchkey_user'] = '123456789';
$this->client->launchkey_admin_callback();
Phake::verify($this->facade, Phake::never())->update_user_meta(Phake::anyParameters());
}
开发者ID:aenglander,项目名称:launchkey-wordpress,代码行数:7,代码来源:class-launchkey-wp-oauth-client-admin-callback-access-token-check-test.php
示例13: test_launchkey_logout_without_access_token_cookie_does_not_set_cookie
public function test_launchkey_logout_without_access_token_cookie_does_not_set_cookie()
{
$this->client->launchkey_logout();
Phake::verify($this->facade, Phake::never())->setcookie(Phake::anyParameters());
}
开发者ID:ThemeSurgeon,项目名称:launchkey-wordpress,代码行数:5,代码来源:class-launchkey-wp-oauth-client-launchkey-logout-test.php
示例14: test_auth_response_callback_does_not_set_launchkey_username_for_non_native_implementations
/**
* @dataProvider provider_non_native_implementations
*
* @param $type
*/
public function test_auth_response_callback_does_not_set_launchkey_username_for_non_native_implementations($type)
{
Phake::when($this->facade)->get_option(Phake::anyParameters())->thenReturn(array(LaunchKey_WP_Options::OPTION_IMPLEMENTATION_TYPE => $type));
Phake::when($this->sdk_sse)->handleEvent(Phake::anyParameters())->thenReturn($this->auth_response);
Phake::when($this->auth_response)->getUserPushId()->thenReturn($expected = 'Expceted User Push ID');
$this->client->launchkey_callback();
Phake::verify($this->facade, Phake::never())->update_user_meta($this->user->ID, 'launchkey_username', $this->anything());
}
开发者ID:aenglander,项目名称:launchkey-wordpress,代码行数:13,代码来源:class-launchkey-wp-native-client-callback-handler-test.php
示例15: test_remove_password_handler_without_verified_nonce_does_not_remove_password
public function test_remove_password_handler_without_verified_nonce_does_not_remove_password()
{
$_GET['launchkey_remove_password'] = '1';
$_GET['launchkey_nonce'] = 'nonce value';
$this->client->remove_password_handler();
Phake::verify($this->facade)->wp_verify_nonce('nonce value', LaunchKey_WP_User_Profile::NONCE_KEY);
Phake::verify($this->facade, Phake::never())->wp_update_user(Phake::anyParameters());
}