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


PHP sfTestFunctional::with方法代码示例

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


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

示例1: dirname

<?php

$app = 'frontend';
$fixtures = 'fixtures/fixtures.yml';
require_once dirname(__FILE__) . '/../../bootstrap/functional.php';
$browser = new sfTestFunctional(new sfBrowser(), null, array('propel' => 'sfTesterPropel'));
$browser->info('Check that ARRAY columns are loaded');
$criteria = AuthorQuery::create()->filterByHobbies(array('foo', 'bar'), Criteria::CONTAINS_ALL);
$browser->with('propel')->begin()->check('Author', $criteria)->end();
开发者ID:kcornejo,项目名称:estadistica,代码行数:9,代码来源:loadDataTest.php

示例2: sfTestFunctional

$browser = new sfTestFunctional(new sfBrowser());
$test = $browser->test();
$conn = Doctrine::getConnectionByTableName('location');
$conn->beginTransaction();
$browser->call('/login', 'GET', array())->with('request')->begin()->isParameter('module', 'sfGuardAuth')->isParameter('action', 'signin')->end()->with('response')->begin()->isStatusCode(401)->end();
$browser->call('/sfJqueryFormVal/FloginForm.js', 'GET', array())->with('request')->begin()->isParameter('module', 'sfJqueryFormVal')->isParameter('action', 'index')->end()->with('response')->begin()->isStatusCode(200)->end();
$browser->call('/login', 'POST', array('signin' => array('username' => 'testuser', 'password' => 'testuser'), 'menu' => 'sf_guard_signin'))->with('request')->begin()->isParameter('module', 'sfGuardAuth')->isParameter('action', 'signin')->end()->info('user not registered')->with('form')->begin()->hasErrors(true)->end()->with('response')->begin()->isStatusCode(200)->end();
$browser->call('/sfJqueryFormVal/FloginForm.js', 'GET', array())->with('request')->begin()->isParameter('module', 'sfJqueryFormVal')->isParameter('action', 'index')->end()->with('response')->begin()->isStatusCode(200)->end();
$browser->call('/user/new', 'GET', array())->with('request')->begin()->isParameter('module', 'sfApply')->isParameter('action', 'apply')->end()->with('response')->begin()->isStatusCode(200)->end();
$browser->call('/sfJqueryFormVal/FRegistrationForm.js', 'GET', array())->with('request')->begin()->isParameter('module', 'sfJqueryFormVal')->isParameter('action', 'index')->end()->with('response')->begin()->isStatusCode(200)->end();
$browser->call('/sfJqueryFormVal/remote/FRegistrationForm/sfValidatorDoctrineUnique', 'GET', array('column' => 'username', 'sfApplyApply' => array('username' => 'limitium')))->with('request')->begin()->isParameter('module', 'sfJqueryFormVal')->isParameter('action', 'remote')->end()->with('response')->begin()->isStatusCode(200)->info("user name limitium busy")->matches("/false/")->end();
$browser->call('/sfJqueryFormVal/remote/FRegistrationForm/sfValidatorDoctrineUnique', 'GET', array('column' => 'username', 'sfApplyApply' => array('username' => 'testuser')))->with('request')->begin()->isParameter('module', 'sfJqueryFormVal')->isParameter('action', 'remote')->end()->with('response')->begin()->isStatusCode(200)->info("user name testuser free")->matches("/true/")->end();
$browser->call('/sfJqueryFormVal/remote/FRegistrationForm/sfValidatorDoctrineUnique', 'GET', array('column' => 'email', 'sfApplyApply' => array('email' => 'limitium@gmail.com')))->with('request')->begin()->isParameter('module', 'sfJqueryFormVal')->isParameter('action', 'remote')->end()->with('response')->begin()->isStatusCode(200)->matches("/false/")->info("email limitium busy")->end();
$browser->call('/sfJqueryFormVal/remote/FRegistrationForm/sfValidatorDoctrineUnique', 'GET', array('column' => 'email', 'sfApplyApply' => array('email' => 'limitium@googlemail.com')))->with('request')->begin()->isParameter('module', 'sfJqueryFormVal')->isParameter('action', 'remote')->end()->with('response')->begin()->isStatusCode(200)->info("email testuser free")->matches("/true/")->end();
$browser->get('/user/new')->click('.button_01', array('sfApplyApply' => array('username' => 'testuser', 'password' => 'testuser', 'email' => 'testuser@gmail.com', 'email2' => 'testuser@gmail.com'), array('_with_csrf' => true)))->info("create user")->with('request')->begin()->isParameter('module', 'sfApply')->isParameter('action', 'apply')->end()->with('form')->begin()->hasErrors(false)->end()->with('response')->begin()->isRedirected(1)->isStatusCode(302)->end()->followRedirect();
$browser->with('request')->begin()->isParameter('module', 'collector')->isParameter('action', 'locations')->end()->with('response')->begin()->isStatusCode(200)->matches("/Поздравляем с успешной регистрацией/")->end();
$browser->call('/my_edit', 'GET', array())->with('request')->begin()->isParameter('module', 'profile')->isParameter('action', 'editMy')->end();
$browser->with('request')->begin()->isForwardedTo('profile', 'edit')->end()->with('response')->begin()->isStatusCode(200)->end();
$browser->call('/profile/city', 'GET', array('q' => 'моск', 'limit' => '10', 'timestamp' => '1319706599403'))->with('request')->begin()->isParameter('module', 'profile')->isParameter('action', 'city')->end()->with('response')->begin()->isStatusCode(200)->end();
$browser->get('/my_edit')->click('.button_01', array('sf_medtod' => 'put', 'profile' => array('first_name' => 'tetst', 'last_name' => 'test', 'birth_date' => '12.10.2011', 'city_id' => '2242', 'description' => '
<p>test</p>', 'sex' => 'on', 'id' => $testuser->user_id), array('_with_csrf' => true), 'id' => $testuser->user_id))->with('request')->begin()->isParameter('module', 'profile')->isParameter('action', 'update')->end();
$browser->with('form')->begin()->hasErrors(false)->end()->with('response')->begin()->isRedirected(1)->isStatusCode(302)->end()->followRedirect();
$browser->with('request')->begin()->isParameter('module', 'profile')->isParameter('action', 'show')->end()->with('response')->begin()->isStatusCode(200)->end();
$browser->call('/logout', 'GET', array())->with('request')->begin()->isParameter('module', 'sfGuardAuth')->isParameter('action', 'signout')->end();
$browser->with('response')->begin()->isRedirected(1)->isStatusCode(302)->end()->followRedirect();
$browser->with('request')->begin()->isParameter('module', 'collector')->isParameter('action', 'locations')->end()->with('response')->begin()->isStatusCode(200)->end();
$browser->call('/data', 'GET', array())->with('request')->begin()->isParameter('module', 'collector')->isParameter('action', 'data')->end()->with('response')->begin()->isStatusCode(200)->end();
$browser->call('/login', 'GET', array())->with('request')->begin()->isParameter('module', 'sfGuardAuth')->isParameter('action', 'signin')->end()->with('response')->begin()->isStatusCode(401)->end();
$browser->call('/sfJqueryFormVal/FloginForm.js', 'GET', array())->with('request')->begin()->isParameter('module', 'sfJqueryFormVal')->isParameter('action', 'index')->end()->with('response')->begin()->isStatusCode(200)->end();
$browser->get('/login')->click('.button_01', array('signin' => array('username' => 'testuser', 'password' => 'testuser'), array('_with_csrf' => true), 'menu' => 'sf_guard_signin'))->with('request')->begin()->isParameter('module', 'sfGuardAuth')->isParameter('action', 'signin')->end();
$browser->with('form')->begin()->hasErrors(false)->end()->with('response')->begin()->isRedirected(1)->isStatusCode(302)->end()->followRedirect();
开发者ID:limitium,项目名称:uberlov,代码行数:31,代码来源:signupTest.php

示例3: dirname

<?php

$app = 'frontend';
$fixtures = 'fixtures/fixtures.yml';
require_once dirname(__FILE__).'/../../bootstrap/functional.php';

$browser = new sfTestFunctional(new sfBrowser(), null, array(
  'propel' => 'sfTesterPropel'
));


$browser->info('Check that ARRAY columns are loaded');
$criteria = AuthorQuery::create()
  ->filterByHobbies(array('foo', 'bar'), Criteria::CONTAINS_ALL);
$browser->with('propel')->begin()->
  check('Author', $criteria)->
end();
开发者ID:nurhidayatullah,项目名称:inventory,代码行数:17,代码来源:loadDataTest.php

示例4: input_tag

<?php

echo input_tag('ctl00$mainPlaceHolder$txtFecha1', '06-05-2010');
include dirname(__FILE__) . '/../../bootstrap/functional.php';
$browser = new sfTestFunctional(new sfBrowser());
$browser->get('http://www.camara.cl/trabajamos/sala_votaciones.aspx');
$browser->with('response')->begin();
$browser->end();
//$browser->checkElement('input ctl00_mainPlaceHolder_txtFecha1', '!/This is a temporary page/');
$browser->with('response')->begin();
//$browser->isStatusCode(200);
$browser->checkElement('body', '!/This is a temporary page/');
$browser->end();
//ctl00_mainPlaceHolder_txtFecha1
/*
$browser->
  get('/Sesion/index')->

  with('request')->begin()->
    isParameter('module', 'Sesion')->
    isParameter('action', 'index')->
  end()->

  with('response')->begin()->
    isStatusCode(200)->
    checkElement('body', '!/This is a temporary page/')->
  end()
;*/
开发者ID:votainteligente,项目名称:legislativo,代码行数:28,代码来源:CamaraSalaVotacionesTest.php


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