original_string: public function fillForm($selector, $data = array(), $submit = false)
      {
          $jsonData = json_encode($data);
          $jsonSubmit = ($submit) ? 'true' : 'false';
  
          $fragment = <<<FRAGMENT
  casper.then(function () {
      this.fill('$selector', $jsonData, $jsonSubmit);
  });
  FRAGMENT;
  
          $this->script .= $fragment;
  
          return $this;
      }
code: public function fillForm($selector, $data = array(), $submit = false)
      {
          $jsonData = json_encode($data);
          $jsonSubmit = ($submit) ? 'true' : 'false';
  
          $fragment = <<<FRAGMENT
  casper.then(function () {
      this.fill('$selector', $jsonData, $jsonSubmit);
  });
  FRAGMENT;
  
          $this->script .= $fragment;
  
          return $this;
      }
code_tokens: public function fillForm ( $ selector , $ data = array ( ) , $ submit = false ) { $ jsonData = json_encode ( $ data ) ; $ jsonSubmit = ( $ submit ) ? 'true' : 'false' ; $ fragment =  <<<FRAGMENT
  casper.then(function () {
      this.fill('$selector', $jsonData, $jsonSubmit);
  });
  FRAGMENT ; $ this -> script .= $ fragment ; return $ this ; }
docstring: fill the form with the array of data
  then submit it if submit is true
  
  @param string $selector
  @param array $data
  @param string|bool $submit
  
  @return \Browser\Casper
docstring_tokens: fill the form with the array of data then submit it if submit is true