<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.
 */

require_once(dirname(__FILE__).'/../../bootstrap/unit.php');

$t = new lime_test(38, new lime_output_color());

// ->click()
$t->diag('->click()');
class myClickBrowser extends sfBrowser
{
  public function setHtml($html)
  {
    $this->dom = new DomDocument('1.0', 'UTF-8');
    $this->dom->validateOnParse = true;
    $this->dom->loadHTML($html);
  }

  public function call($uri, $method = 'get', $parameters = array(), $changeStack = true)
  {
    $this->fields = array();

    return array($method, $uri, $parameters);
  }
}

$html = <<<EOF
<html>
  <body>
    <a href="/mylink">test link</a>
    <a href="/myimagelink"><img src="myimage.gif" alt="image link" /></a>
    <form action="/myform" method="post">
      <input type="text" name="text_default_value" value="default" />
      <input type="text" name="text" value="" />
      <textarea name="textarea">content</textarea>
      <select name="select"><commit_msg>fixed wrong test number (closes #1136)<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.
 */

require_once(dirname(__FILE__).'/../../bootstrap/unit.php');

$t = new lime_test(39, new lime_output_color());

// ->click()
$t->diag('->click()');
class myClickBrowser extends sfBrowser
{
  public function setHtml($html)
  {
    $this->dom = new DomDocument('1.0', 'UTF-8');
    $this->dom->validateOnParse = true;
    $this->dom->loadHTML($html);
  }

  public function call($uri, $method = 'get', $parameters = array(), $changeStack = true)
  {
    $this->fields = array();

    return array($method, $uri, $parameters);
  }
}

$html = <<<EOF
<html>
  <body>
    <a href="/mylink">test link</a>
    <a href="/myimagelink"><img src="myimage.gif" alt="image link" /></a>
    <form action="/myform" method="post">
      <input type="text" name="text_default_value" value="default" />
      <input type="text" name="text" value="" />
      <textarea name="textarea">content</textarea>
      <select name="select">
{'fraction_non_alphanumeric': 0.18997025074373142, 'fraction_numerical': 0.012749681257968552, 'mean_word_length': 3.804081632653061, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 53, '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': '7037143', 'n_tokens_mistral': 796, 'n_tokens_neox': 760, 'n_words': 198}