<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend_compat'; $fixtures = 'fixtures/fixtures.yml'; if (!include(dirname(__FILE__).'/../../bootstrap/functional.php')) { return; } include(dirname(__FILE__).'/backendTestBrowser.class.php'); $b = new backendTestBrowser(); // edit fields $b-> checkEditCustomization('edit field name customization', array('fields' => array('body' => array('name' => 'My Body'))))-> checkResponseElement('label[for="article_body"]', 'My Body:') ;
<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend_compat'; $fixtures = 'fixtures/fixtures.yml'; if (!(include dirname(__FILE__) . '/../../bootstrap/functional.php')) { return; } include dirname(__FILE__) . '/backendTestBrowser.class.php'; $b = new backendTestBrowser(); // partial in a tabular list // we add a filters parameter because the action class won't be reloaded after the first time! // and we need the filter line definition for the last test! $b->checkListCustomization('partial support in tabular list', array('display' => array('_body'), 'filters' => array('title')))->checkResponseElement('body table tbody tr[class="sf_admin_row_0"] td', '/\\s*before bar body after\\s*/')->checkResponseElement('body table tbody tr[class="sf_admin_row_1"] td', '/\\s*before bar bar body after\\s*/'); // partial in a stacked list $b->checkListCustomization('partial support in tabular list', array('layout' => 'stacked', 'params' => "%%_body%%"))->checkResponseElement('body table tbody tr[class="sf_admin_row_0"] td', '/\\s*before bar body after\\s*/')->checkResponseElement('body table tbody tr[class="sf_admin_row_1"] td', '/\\s*before bar bar body after\\s*/'); // partial in edit $b->checkEditCustomization('partial support in edit', array('display' => array('_body')))->checkResponseElement('body form#sf_admin_edit_form textarea[name="article[body]"][id="article_body"]', '/\\s*before bar body after\\s*/'); // partial for a filter $b->checkListCustomization('partial support for a filter', array('filters' => array('_body')))->checkResponseElement('body div.sf_admin_filters form input[name="body_filter"][value="before after"]');
<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend'; $fixtures = 'fixtures/fixtures.yml'; if (!(include dirname(__FILE__) . '/../../bootstrap/functional.php')) { return; } include dirname(__FILE__) . '/backendTestBrowser.class.php'; $b = new backendTestBrowser(); $b->initialize(); // list with stacked layout $b->checkListCustomization('list stacked layout', array('layout' => 'stacked'))->checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="8"] a', 1)->checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="8"]', '/foo title/')->checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="8"]', '/bar body/')->checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="8"] img[src*="tick"]')->checkListCustomization('list stacked layout', array('layout' => 'stacked', 'params' => 'Article %%=title%% with body %%body%%'))->checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="8"] a', 'foo title')->checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="8"]', '/with body bar body/'); // small customization tests $b->checkListCustomization('list title customization', array('title' => 'list test title'))->checkResponseElement('body h1', 'list test title')->checkListCustomization('list field name customization', array('fields' => array('body' => array('name' => 'My Body'))))->checkResponseElement('#sf_admin_list_th_body a', 'My Body')->checkListCustomization('list fields display customization', array('display' => array('body', 'title')))->checkResponseElement('#sf_admin_list_th_body', true)->checkResponseElement('#sf_admin_list_th_title', true)->checkResponseElement('#sf_admin_list_th_id', false)->checkResponseElement('#sf_admin_list_th_category_id', false)->checkResponseElement('#sf_admin_list_th_created_at', false)->checkListCustomization('remove create button', array('actions' => array()))->checkResponseElement('body input[class="sf_admin_action_create"][onclick*="/article/create"]', false)->checkListCustomization('add custom button', array('actions' => array('_create' => null, 'custom' => array('name' => 'my button', 'action' => 'myAction', 'params' => 'class=myButtonClass'))))->checkResponseElement('body input[class="sf_admin_action_create"][onclick*="/article/create"]', true)->checkResponseElement('body input[class="myButtonClass"][onclick*="/article/myAction"][value="my button"]', true)->checkListCustomization('add custom button without create', array('actions' => array('custom' => array('name' => 'my button', 'action' => 'myAction', 'params' => 'class=myButtonClass'))))->checkResponseElement('body input[class="sf_admin_action_create"][onclick*="/article/create"]', false)->checkResponseElement('body input[class="myButtonClass"][onclick*="/article/myAction"][value="my button"]', true)->checkEditCustomization('edit title customization', array('title' => 'edit test title'))->checkResponseElement('body h1', 'edit test title')->checkEditCustomization('edit title customization', array('title' => 'edit "%%title%%"'))->checkResponseElement('body h1', 'edit "foo title"')->checkEditCustomization('edit fields display customization', array('display' => array('body', 'title')))->checkResponseElement('label[for="article_body"]', true)->checkResponseElement('label[for="article_title"]', true)->checkResponseElement('label[for="article_id"]', false)->checkResponseElement('label[for="article_category_id"]', false)->checkResponseElement('label[for="article_created_at"]', false)->checkEditCustomization('edit fields display customization', array('display' => array('NONE' => array('body'), 'Another' => array('title'))))->checkResponseElement('label[for="article_body"]', true)->checkResponseElement('label[for="article_title"]', true)->checkResponseElement('label[for="article_id"]', false)->checkResponseElement('label[for="article_category_id"]', false)->checkResponseElement('label[for="article_created_at"]', false)->checkResponseElement('fieldset#sf_fieldset_none', true)->checkResponseElement('fieldset#sf_fieldset_none h2', false)->checkResponseElement('fieldset#sf_fieldset_none textarea[name="article[body]"]', true)->checkResponseElement('fieldset#sf_fieldset_another', true)->checkResponseElement('fieldset#sf_fieldset_another h2', 'Another')->checkResponseElement('fieldset#sf_fieldset_another input[name="article[title]"]', true)->checkEditCustomization('remove save button', array('actions' => array()))->checkResponseElement('body input[class="sf_admin_action_list"][onclick*="/article/list"]', false)->checkResponseElement('body input[name="save_and_add"]', false)->checkResponseElement('body input[name="save"]', false)->checkResponseElement('body input[class="sf_admin_action_delete"][onclick*="confirm"]', false)->checkEditCustomization('remove save button', array('actions' => array('_save' => null)))->checkResponseElement('body input[name="save_and_add"]', false)->checkResponseElement('body input[name="save"]', true)->checkResponseElement('body input[class="sf_admin_action_delete"][onclick*="confirm"]', false)->checkEditCustomization('add custom button', array('actions' => array('_save' => null, 'custom' => array('name' => 'my button', 'action' => 'myAction', 'params' => 'class=myButtonClass'))))->checkResponseElement('body input[name="save"]', true)->checkResponseElement('body input[class="myButtonClass"][onclick*="/article/myAction/id/1"][value="my button"]', true)->checkEditCustomization('add custom button without save', array('actions' => array('custom' => array('name' => 'my button', 'action' => 'myAction', 'params' => 'class=myButtonClass'))))->checkResponseElement('body input[name="save"]', false)->checkResponseElement('body input[class="myButtonClass"][onclick*="/article/myAction/id/1"][value="my button"]', true)->checkEditCustomization('rename save button', array('actions' => array('save' => array('name' => 'My save'))))->checkResponseElement('body input[value="My save"]', true)->checkListCustomization('list fields hiding customization', array('hide' => array('body', 'category_id')))->checkResponseElement('#sf_admin_list_th_body', false)->checkResponseElement('#sf_admin_list_th_title', true)->checkResponseElement('#sf_admin_list_th_id', true)->checkResponseElement('#sf_admin_list_th_category_id', false)->checkResponseElement('#sf_admin_list_th_created_at', true)->checkEditCustomization('edit fields hiding customization', array('hide' => array('body', 'title')))->checkResponseElement('label[for="article_body"]', false)->checkResponseElement('label[for="article_title"]', false)->checkResponseElement('label[for="article_id"]', false)->checkResponseElement('label[for="article_category_id"]', true)->checkResponseElement('label[for="article_created_at"]', true)->checkEditCustomization('foreign key select customization', array())->checkResponseElement('#article_book_id > option[value=""]', true)->checkEditCustomization('foreign key select customization', array('fields' => array('book_id' => array('params' => 'include_blank=false'))))->checkResponseElement('#article_book_id > option[value=""]', false)->checkEditCustomization('foreign key select customization', array('fields' => array('book_id' => array('params' => 'include_blank=true'))))->checkResponseElement('#article_book_id > option[value=""]', true)->checkEditCustomization('foreign key select customization', array('fields' => array('book_id' => array('params' => 'include_custom=--custom-- include_blank=false'))))->checkResponseElement('#article_book_id > option[value=""]', 1);
<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend_compat'; $fixtures = 'fixtures/fixtures.yml'; if (!(include dirname(__FILE__) . '/../../bootstrap/functional.php')) { return; } include dirname(__FILE__) . '/backendTestBrowser.class.php'; $b = new backendTestBrowser(); // edit fields $b->checkEditCustomization('edit field name customization', array('fields' => array('body' => array('name' => 'My Body'))))->checkResponseElement('label[for="article_body"]', 'My Body:');
<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend'; $fixtures = 'fixtures/fixtures.yml'; if (!(include dirname(__FILE__) . '/../bootstrap/functional.php')) { return; } include dirname(__FILE__) . '/backendTestBrowser.class.php'; $b = new backendTestBrowser(); $b->post('/article/edit/id/1', array('article' => array('end_date' => 'not a date')))->isStatusCode(302)->isRequestParameter('module', 'article')->isRequestParameter('action', 'edit')->isRedirected(true)->followRedirect()->checkResponseElement('input[name="article[end_date]"][value=""]'); // non rich date (without time) $tomorrow = time() + 86400 + 3600; $b->customizeGenerator(array('edit' => array('display' => array('title', 'end_date'), 'fields' => array('end_date' => array('params' => 'withtime=false rich=false')))))->post('/article/edit/id/1', array('article' => array('end_date' => array('day' => date('d', $tomorrow), 'month' => date('m', $tomorrow), 'year' => date('Y', $tomorrow)))))->isStatusCode(302)->isRequestParameter('module', 'article')->isRequestParameter('action', 'edit')->isRedirected(true)->followRedirect()->checkResponseElement(sprintf('select[name="article[end_date][day]"] option[value="%s"][selected="selected"]', date('d', $tomorrow)))->checkResponseElement(sprintf('select[name="article[end_date][month]"] option[value="%s"][selected="selected"]', date('m', $tomorrow)))->checkResponseElement(sprintf('select[name="article[end_date][year]"] option[value="%s"][selected="selected"]', date('Y', $tomorrow)))->checkResponseElement('select[name="article[end_date][hour]"]', false)->checkResponseElement('select[name="article[end_date][minute]"]', false)->checkResponseElement('script[src*="calendar"]', false)->checkResponseElement('script[src]', false)->checkResponseElement('link[href*="calendar"]', false)->checkResponseElement('link[href][media]', 2); // non rich date (with time) $b->customizeGenerator(array('edit' => array('fields' => array('end_date' => array('params' => 'withtime=true rich=false')))))->post('/article/edit/id/1', array('article' => array('end_date' => array('day' => date('d', $tomorrow), 'month' => date('m', $tomorrow), 'year' => date('Y', $tomorrow), 'hour' => date('G', $tomorrow), 'minute' => date('i', $tomorrow)))))->isStatusCode(302)->isRequestParameter('module', 'article')->isRequestParameter('action', 'edit')->isRedirected(true)->followRedirect()->checkResponseElement(sprintf('select[name="article[end_date][day]"] option[value="%s"][selected="selected"]', date('d', $tomorrow)))->checkResponseElement(sprintf('select[name="article[end_date][month]"] option[value="%s"][selected="selected"]', date('m', $tomorrow)))->checkResponseElement(sprintf('select[name="article[end_date][year]"] option[value="%s"][selected="selected"]', date('Y', $tomorrow)))->checkResponseElement(sprintf('select[name="article[end_date][hour]"] option[value="%s"][selected="selected"]', date('G', $tomorrow)))->checkResponseElement(sprintf('select[name="article[end_date][minute]"] option[value="%s"][selected="selected"]', date('i', $tomorrow)));
<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend_compat'; $fixtures = 'fixtures/fixtures.yml'; if (!include(dirname(__FILE__).'/../../bootstrap/functional.php')) { return; } include(dirname(__FILE__).'/backendTestBrowser.class.php'); $b = new backendTestBrowser(); // max per page $b-> checkListCustomization('max per page customization', array('max_per_page' => 1))-> checkResponseElement('body table tfoot tr th a[href*="/article/list/page/2"]', true)-> checkResponseElement('body table tbody tr', 1) ;
<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend_compat'; $fixtures = 'fixtures/fixtures.yml'; if (!(include dirname(__FILE__) . '/../../bootstrap/functional.php')) { return; } include dirname(__FILE__) . '/backendTestBrowser.class.php'; $b = new backendTestBrowser(); $b->checkListCustomization('add batch action', array('batch_actions' => array('_deleteSelected' => null, 'custom' => array('name' => 'my button', 'action' => 'myAction'))))->checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td input[class="sf_admin_batch_checkbox"][type="checkbox"]', true)->checkResponseElement('body div[id="sf_admin_batch_action_choice"] select[name="sf_admin_batch_action"]', true)->checkResponseElement('body div[id="sf_admin_batch_action_choice"] select[name="sf_admin_batch_action"] option[value="deleteSelected"]', "Delete Selected")->checkResponseElement('body div[id="sf_admin_batch_action_choice"] select[name="sf_admin_batch_action"] option[value="custom"]', "my button")->setField('sf_admin_batch_selection[]', array(1, 3, 5))->setField('sf_admin_batch_action', 'custom')->click('Ok')->isStatusCode(200)->responseContains('Selected 1, 3, 5');
<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend'; $fixtures = 'fixtures/fixtures.yml'; if (!(include dirname(__FILE__) . '/../bootstrap/functional.php')) { return; } include dirname(__FILE__) . '/backendTestBrowser.class.php'; $b = new backendTestBrowser(); // max per page $b->checkListCustomization('max per page customization', array('max_per_page' => 1))->checkResponseElement('body table tfoot tr th a[href*="/article/list/page/2"]', true)->checkResponseElement('body table tbody tr', 1);
* (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend_compat'; $fixtures = 'fixtures/fixtures.yml'; if (!include(dirname(__FILE__).'/../../bootstrap/functional.php')) { return; } include(dirname(__FILE__).'/backendTestBrowser.class.php'); $b = new backendTestBrowser(); // filters $b-> checkListCustomization('filters', array('filters' => array('title', 'body', 'online', 'category_id', 'created_at')))-> checkResponseElement('div.sf_admin_filters label[for="filters_title"]', 'Title:')-> checkResponseElement('div.sf_admin_filters input[name="filters[title]"][id="filters_title"]')-> checkResponseElement('div.sf_admin_filters label[for="filters_body"]', 'Body:')-> checkResponseElement('div.sf_admin_filters input[name="filters[body]"][id="filters_body"]')-> checkResponseElement('div.sf_admin_filters label[for="filters_online"]', 'Online:')-> checkResponseElement('div.sf_admin_filters select[name="filters[online]"][id="filters_online"] option', 3)-> checkResponseElement('div.sf_admin_filters label[for="filters_category_id"]', 'Category:')-> checkResponseElement('div.sf_admin_filters select[name="filters[category_id]"][id="filters_category_id"] option', 3)-> checkResponseElement('div.sf_admin_filters label[for="filters_created_at"]', 'Created at:')-> checkResponseElement('div.sf_admin_filters input[name="filters[created_at][from]"][id="filters_created_at_from"]')-> checkResponseElement('div.sf_admin_filters input[name="filters[created_at][to]"][id="filters_created_at_to"]')
<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend'; $fixtures = 'fixtures/fixtures.yml'; if (!(include dirname(__FILE__) . '/../../bootstrap/functional.php')) { return; } include dirname(__FILE__) . '/backendTestBrowser.class.php'; $b = new backendTestBrowser(); $b->initialize(); // filters $b->checkListCustomization('filters', array('filters' => array('title', 'body', 'online', 'category_id', 'created_at')))->checkResponseElement('div.sf_admin_filters label[for="filters_title"]', 'Title:')->checkResponseElement('div.sf_admin_filters input[name="filters[title]"][id="filters_title"]')->checkResponseElement('div.sf_admin_filters label[for="filters_body"]', 'Body:')->checkResponseElement('div.sf_admin_filters input[name="filters[body]"][id="filters_body"]')->checkResponseElement('div.sf_admin_filters label[for="filters_online"]', 'Online:')->checkResponseElement('div.sf_admin_filters select[name="filters[online]"][id="filters_online"] option', 3)->checkResponseElement('div.sf_admin_filters label[for="filters_category_id"]', 'Category:')->checkResponseElement('div.sf_admin_filters select[name="filters[category_id]"][id="filters_category_id"] option', 3)->checkResponseElement('div.sf_admin_filters label[for="filters_created_at"]', 'Created at:')->checkResponseElement('div.sf_admin_filters input[name="filters[created_at][from]"][id="filters_created_at_from"]')->checkResponseElement('div.sf_admin_filters input[name="filters[created_at][to]"][id="filters_created_at_to"]'); $b->checkListCustomization('filters', array('filters' => array('title'), 'fields' => array('title' => array('filter_is_empty' => true))))->checkResponseElement('div.sf_admin_filters label[for="filters_title_is_empty"]');
* (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend_compat'; $fixtures = 'fixtures/fixtures.yml'; if (!include(dirname(__FILE__).'/../../bootstrap/functional.php')) { return; } include(dirname(__FILE__).'/backendTestBrowser.class.php'); $b = new backendTestBrowser(); // partial in a tabular list // we add a filters parameter because the action class won't be reloaded after the first time! // and we need the filter line definition for the last test! $b-> checkListCustomization('partial support in tabular list', array('display' => array('_body'), 'filters' => array('title')))-> checkResponseElement('body table tbody tr[class="sf_admin_row_0"] td', '/\s*before bar body after\s*/')-> checkResponseElement('body table tbody tr[class="sf_admin_row_1"] td', '/\s*before bar bar body after\s*/') ; // partial in a stacked list $b-> checkListCustomization('partial support in tabular list', array('layout' => 'stacked', 'params' => "%%_body%%"))-> checkResponseElement('body table tbody tr[class="sf_admin_row_0"] td', '/\s*before bar body after\s*/')-> checkResponseElement('body table tbody tr[class="sf_admin_row_1"] td', '/\s*before bar bar body after\s*/')
<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend'; $fixtures = 'fixtures/fixtures.yml'; if (!(include dirname(__FILE__) . '/../../bootstrap/functional.php')) { return; } include dirname(__FILE__) . '/backendTestBrowser.class.php'; $b = new backendTestBrowser(); $b->initialize(); launch_tests($b); sfConfig::set('sf_escaping_strategy', 'both'); launch_tests($b); function launch_tests($b) { // m2m relationships $b->checkEditCustomization('m2m relationship (admin_double_list)', array('display' => array('title', 'body', 'author_article'), 'fields' => array('author_article' => array('type' => 'admin_double_list', 'params' => array('through_class' => 'AuthorArticle')))))->checkResponseElement('script[src*="double_list"]')->checkResponseElement('script[src*="prototype"]')->checkResponseElement('script[src]', 2)->checkResponseElement('link[href][media]', 2)->checkResponseElement('div.form-row label', 'Author article:', array('position' => 2))->checkResponseElement('div.form-row select[name="unassociated_author_article[]"][through_class]', false)->checkResponseElement('div.form-row select[name="unassociated_author_article[]"]', true, array('position' => 2))->checkResponseElement('div.form-row select[name="unassociated_author_article[]"] option', 1)->checkResponseElement('div.form-row select[name="associated_author_article[]"][through_class]', false)->checkResponseElement('div.form-row select[name="associated_author_article[]"]', true, array('position' => 2))->checkResponseElement('div.form-row select[name="associated_author_article[]"] option', 2)->checkEditCustomization('m2m relationship (admin_select_list)', array('display' => array('title', 'body', 'author_article'), 'fields' => array('author_article' => array('type' => 'admin_select_list', 'params' => array('through_class' => 'AuthorArticle')))))->checkResponseElement('script[src]', false)->checkResponseElement('div.form-row label', 'Author article:', array('position' => 2))->checkResponseElement('div.form-row select[name="associated_author_article[]"][through_class]', false)->checkResponseElement('div.form-row select[name="associated_author_article[]"][multiple="multiple"]', true)->checkResponseElement('div.form-row select[name="associated_author_article[]"] option', 3)->checkResponseElement('div.form-row select[name="associated_author_article[]"] option[selected="selected"]', 2)->checkEditCustomization('m2m relationship (admin_check_list)', array('display' => array('title', 'body', 'author_article'), 'fields' => array('author_article' => array('type' => 'admin_check_list', 'params' => array('through_class' => 'AuthorArticle')))))->checkResponseElement('script[src]', false)->checkResponseElement('div.form-row label', 'Author article:', array('position' => 2))->checkResponseElement('div.form-row input[type="checkbox"][name="associated_author_article[]"][checked="checked"]', 2)->checkResponseElement('div.form-row input[type="checkbox"][name="associated_author_article[]"]', 3)->checkResponseElement('div.form-row input[type="checkbox"][name="associated_author_article[]"][through_class]', false)->checkResponseElement('div.form-row label[for="associated_author_article_1"]')->checkResponseElement('div.form-row label[for="associated_author_article_2"]')->checkResponseElement('div.form-row label[for="associated_author_article_3"]')->click('save', array('associated_author_article' => array(2, 3)))->isStatusCode(302)->isRequestParameter('module', 'article')->isRequestParameter('action', 'save')->isRedirected()->followRedirect()->isStatusCode(200)->isRequestParameter('module', 'article')->isRequestParameter('action', 'edit')->isRequestParameter('id', 1)->checkResponseElement('div.form-row input[type="checkbox"][id="associated_author_article_1"][checked="checked"]', false)->checkResponseElement('div.form-row input[type="checkbox"][id="associated_author_article_2"][checked="checked"]')->checkResponseElement('div.form-row input[type="checkbox"][id="associated_author_article_3"][checked="checked"]'); }
* (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend_compat'; $fixtures = 'fixtures/fixtures.yml'; if (!include(dirname(__FILE__).'/../../bootstrap/functional.php')) { return; } include(dirname(__FILE__).'/backendTestBrowser.class.php'); $b = new backendTestBrowser(); // list with stacked layout $b-> // simple checkListCustomization('list stacked layout', array('layout' => 'stacked'))-> checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="9"] a', 1)-> checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="9"]', '/foo title/')-> checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="9"]', '/bar body/')-> checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="9"] img[src*="tick"]')-> // with some customization checkListCustomization('list stacked layout', array('layout' => 'stacked', 'params' => 'Article %%=title%% with body %%body%%'))-> checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="9"] a', 'foo title')-> checkResponseElement('table.sf_admin_list tr.sf_admin_row_0 td[colspan="9"]', '/with body bar body/') ;
* (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $app = 'backend_compat'; $fixtures = 'fixtures/fixtures.yml'; if (!include(dirname(__FILE__).'/../../bootstrap/functional.php')) { return; } include(dirname(__FILE__).'/backendTestBrowser.class.php'); $b = new backendTestBrowser(); $b-> post('/article/edit/id/1', array('article' => array('end_date' => 'not a date')))-> isStatusCode(302)-> isRequestParameter('module', 'article')-> isRequestParameter('action', 'edit')-> isRedirected(true)-> followRedirect()-> checkResponseElement('input[name="article[end_date]"][value=""]') ; // non rich date (without time) $tomorrow = time() + 86400 + 3600; $b->