<commit_before><?php

/*
 * This file is part of the symfony package.
 * (c) 2004-2006 <NAME> <<EMAIL>>
 * 
 * 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();

launch_tests($b);

sfConfig::set('sf_escaping_strategy', 'both');
launch_tests($b);

function launch_tests($b)
{
  // m2m relationships
  $b->
    // admin_double_list
    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)-><commit_msg>removed both escaping strategy<commit_after><?php

/*
 * This file is part of the symfony package.
 * (c) 2004-2006 <NAME> <<EMAIL>>
 * 
 * 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();

sfConfig::set('sf_escaping_strategy', 'off');
launch_tests($b);

sfConfig::set('sf_escaping_strategy', 'on');
launch_tests($b);

function launch_tests($b)
{
  // m2m relationships
  $b->
    // admin_double_list
    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)->
{'fraction_non_alphanumeric': 0.18141168955605239, 'fraction_numerical': 0.009581603321622485, 'mean_word_length': 6.25, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3192491', 'n_tokens_mistral': 989, 'n_tokens_neox': 941, 'n_words': 186}