<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 = 'frontend';
$ret = include(dirname(__FILE__).'/bootstrap.php');
if (!$ret)
{
  return;
}

$b = new sfTestBrowser();
$b->initialize();

// default main page
$b->
  get('/')->
  isStatusCode(200)->
  isRequestParameter('module', 'default')->
  isRequestParameter('action', 'index')->
  checkResponseElement('body', '/congratulations/i')
;

// default 404
$b->
  get('/nonexistant')->
  isStatusCode(404)->
  checkResponseElement('body', '!/congratulations/i')
;

// available
sfConfig::set('sf_available', false);
$b->
  get('/')->
  isStatusCode(200)->
  checkResponseElement('body', '/unavailable/i')->
  checkResponseElement('body', '!/congratulations/i')
;
sfConfig::set('sf_available', true);

// module.yml: enabled
$b->
  get('/configModuleDisabled')->
  isStatusCode(200)->
  checkResponseElement('body', '/module is unavailable/i')->
  checkResponseElement('body', '!/congratulations/i')
;

// view.yml: has_layout
$b->
  get('/configViewHasLayout/withoutLayout')->
  isStatusCode(200)->
  checkResponseElement('body', '/no layout/i')->
  checkResponseElement('head title', false)
;

// security.yml: is_secure
$b->
  get('/configSecurityIsSecure')->
  isStatusCode(200)->
  checkResponseElement('body', '/You must enter your credentials to access this page/i')
;

// settings.yml: max_forwards
$b->
  get('/configSettingsMaxForwards/selfForward')->
  isStatusCode(200)->
  checkResponseElement('body', '/Too many forwards have been detected for this request/i')
;

// filters.yml: add a filter
$b->
  get('/configFiltersSimpleFilter')->
  isStatusCode(200)->
  checkResponseElement('p', '/in a filter/i')->
  checkResponseElement('body', '!/congratulation/i')
;

// css and js inclusions
$b->
  get('/assetInclusion/index')->
  isStatusCode(200)->
  checkResponseElement('head link[rel="stylesheet"]', false)->
  checkResponseElement('head script[type="text/javascript"]', false)
;<commit_msg>fixed a bug in a test<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 = 'frontend';
$ret = include(dirname(__FILE__).'/bootstrap.php');
if (!$ret)
{
  return;
}

$b = new sfTestBrowser();
$b->initialize();

// default main page
$b->
  get('/')->
  isStatusCode(200)->
  isRequestParameter('module', 'default')->
  isRequestParameter('action', 'index')->
  checkResponseElement('body', '/congratulations/i')
;

// default 404
$b->
  get('/nonexistant')->
  isStatusCode(404)->
  checkResponseElement('body', '!/congratulations/i')
;

// available
sfConfig::set('sf_available', false);
$b->
  get('/')->
  isStatusCode(200)->
  checkResponseElement('body', '/unavailable/i')->
  checkResponseElement('body', '!/congratulations/i')
;
sfConfig::set('sf_available', true);

// module.yml: enabled
$b->
  get('/configModuleDisabled')->
  isStatusCode(200)->
  checkResponseElement('body', '/module is unavailable/i')->
  checkResponseElement('body', '!/congratulations/i')
;

// view.yml: has_layout
$b->
  get('/configViewHasLayout/withoutLayout')->
  isStatusCode(200)->
  checkResponseElement('body', '/no layout/i')->
  checkResponseElement('head title', false)
;

// security.yml: is_secure
$b->
  get('/configSecurityIsSecure')->
  isStatusCode(200)->
  checkResponseElement('body', '/You must enter your credentials to access this page/i')
;

// settings.yml: max_forwards
$b->
  get('/configSettingsMaxForwards/selfForward')->
  isStatusCode(200)->
  checkResponseElement('body', '/Too many forwards have been detected for this request/i')
;

// filters.yml: add a filter
$b->
  get('/configFiltersSimpleFilter')->
  isStatusCode(200)->
  checkResponseElement('body', '/in a filter/i')->
  checkResponseElement('body', '!/congratulation/i')
;

// css and js inclusions
$b->
  get('/assetInclusion/index')->
  isStatusCode(200)->
  checkResponseElement('head link[rel="stylesheet"]', false)->
  checkResponseElement('head script[type="text/javascript"]', false)
;
{'fraction_non_alphanumeric': 0.1857441374506617, 'fraction_numerical': 0.017645693057812863, 'mean_word_length': 4.759358288770054, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 79, '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': '3607271', 'n_tokens_mistral': 1420, 'n_tokens_neox': 1340, 'n_words': 309}