<commit_before><?php

include(dirname(__FILE__).'/../../bootstrap/functional.php');

$browser = new sfTestFunctional(new sfBrowser());

$browser->
  get('/connection/index')->

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

  with('response')->begin()->
    isStatusCode(200)->
    checkElement('body', '!/This is a temporary page/')->
  end()
;<commit_msg>added the connection actions of pc_backend for the functional test (refs #1817 BP from #1741)<commit_after><?php

include(dirname(__FILE__).'/../../bootstrap/functional.php');

$browser = new opTestFunctional(new sfBrowser(), new lime_test(null, new lime_output_color()));
$browser
  ->info('Login')
  ->get('/default/login')
  ->click('ログイン', array('admin_user' => array(
    'username' => 'admin',
    'password' => 'password',
  )))
  ->isStatusCode(302)

// CSRF
  ->info('/connection - CSRF')
  ->post('/connection')
  ->checkCSRF()

  ->info('/connection/1 - CSRF')
  ->post('/connection/1')
  ->checkCSRF()

  ->info('/connection/1/delete - CSRF')
  ->post('/connection/1/delete')
  ->checkCSRF()

  ->info('//connection/removeToken/id/1 - CSRF')
  ->post('/connection/removeToken/id/1')
  ->checkCSRF()
;
{'fraction_non_alphanumeric': 0.22562449637389204, 'fraction_numerical': 0.016116035455278, 'mean_word_length': 4.048780487804878, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '4622248', 'n_tokens_mistral': 425, 'n_tokens_neox': 403, 'n_words': 75}