当前位置: 首页>>代码示例>>PHP>>正文


PHP sfTestFunctional::isRequestParameter方法代码示例

本文整理汇总了PHP中sfTestFunctional::isRequestParameter方法的典型用法代码示例。如果您正苦于以下问题:PHP sfTestFunctional::isRequestParameter方法的具体用法?PHP sfTestFunctional::isRequestParameter怎么用?PHP sfTestFunctional::isRequestParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sfTestFunctional的用法示例。


在下文中一共展示了sfTestFunctional::isRequestParameter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: urlencode

$browser->responseContains('An email has been sent to you, in order to verify your address.');
$limeTest->plan += 3;
$subscriber = SubscriberPeer::retrieveByEmail($email);
$limeTest->isa_ok($subscriber, 'Subscriber', 'Subscriber found.');
$limeTest->is($subscriber->getName(), $name, 'Name matches.');
$limeTest->is($subscriber->getEmail(), $email, 'Email matches.');
$limeTest->plan += 3;
$activationHash = $subscriber->getActivateHash();
$unsubscribeHash = $subscriber->getUnsubscribeHash();
$limeTest->isnt(empty($activationHash), true, 'Activation Hash set.');
$limeTest->isnt(empty($unsubscribeHash), true, 'Unsubscribe Hash set.');
$limeTest->isnt($subscriber->isSubscribed(), true, 'Subscriber is not activated, yet.');
# test activation and unsubscribe with fixtures
$limeTest->plan += 1;
$subscriber = SubscriberPeer::retrieveByEmail('subscriber-two@example.com');
$limeTest->ok(!$subscriber->isSubscribed(), 'Subscriber not activated, yet.');
$browser->getAndCheck('sfSubscription', 'activate', '/newsletter/subscription/activate/' . $subscriber->getId() * 42 . '?' . activateAction::PARAMETER_NAME . '=invalid', 404);
$browser->getAndCheck('sfSubscription', 'activate', '/newsletter/subscription/activate/' . $subscriber->getId() . '?' . activateAction::PARAMETER_NAME . '=5uhj32l4', 200);
$browser->isRequestParameter('id', $subscriber->getId());
$browser->isRequestParameter(activateAction::PARAMETER_NAME, '5uhj32l4');
$browser->responseContains('Your email address has been verified.');
$limeTest->plan += 1;
$subscriber = SubscriberPeer::retrieveByEmail('subscriber-two@example.com');
$limeTest->ok($subscriber->isSubscribed(), 'Subscriber activated.');
$browser->getAndCheck('sfSubscription', 'unsubscribe', '/newsletter/subscription/unsubscribe/' . urlencode($subscriber->getEmail()) . '?' . unsubscribeAction::PARAMETER_NAME . '=asd87324', 200);
$browser->isRequestParameter('email', $subscriber->getEmail());
$browser->isRequestParameter(unsubscribeAction::PARAMETER_NAME, 'asd87324');
$browser->responseContains('Your email address has been unsubscribed from the newsletter.');
$limeTest->plan += 1;
$subscriber = SubscriberPeer::retrieveByEmail('subscriber-two@example.com');
$limeTest->ok(!$subscriber->isSubscribed(), 'Subscriber unsubscribed again.');
开发者ID:havvg,项目名称:sfNewsletterPlugin,代码行数:31,代码来源:sfNewsletterPlugin-SubscriptionTest.php


注:本文中的sfTestFunctional::isRequestParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。