<commit_before><?php
/**
 * Created by PhpStorm.
 * User: <NAME>
 * Email: <EMAIL>
 * Date: 11/21/13
 * Time: 4:00 PM
 */

namespace Fp\JsFormValidatorBundle\Tests\Functional;


use Behat\Mink\Element\NodeElement;
use Fp\JsFormValidatorBundle\Tests\BaseTestCase;

class JavascriptModelsTest extends BaseTestCase {
    protected $base;

    protected function setUp()
    {
        $this->base = $this->getKernel()
            ->getContainer()
            ->getParameter('mink.base_url');
    }

    /**
     * @param $name
     *
     * @return \Behat\Mink\Element\NodeElement|null
     */
    protected function getSubmittedForm($name)
    {
        $session = $this->getMink()->getSession('selenium2');
        $session->visit($this->base.'/fp_js_form_validator/javascript_unit_test/' . $name);
        var_dump($session->getPage()->getHtml());
        $session->getPage()->findButton('form_submit')->click();
        $session->wait(5000,
            "FpJsFormValidatorFactory.forms.form.countProcessedRequests() == 0"
        );
        return $session->getPage()->find('css', 'form');
    }

    /**
     * @param \Behat\Mink\Element\NodeElement $element<commit_msg>travis config fixes<commit_after><?php
/**
 * Created by PhpStorm.
 * User: <NAME>
 * Email: <EMAIL>
 * Date: 11/21/13
 * Time: 4:00 PM
 */

namespace Fp\JsFormValidatorBundle\Tests\Functional;


use Behat\Mink\Element\NodeElement;
use Fp\JsFormValidatorBundle\Tests\BaseTestCase;

class JavascriptModelsTest extends BaseTestCase {
    protected $base;

    protected function setUp()
    {
        $this->base = $this->getKernel()
            ->getContainer()
            ->getParameter('mink.base_url');
    }

    /**
     * @param $name
     *
     * @return \Behat\Mink\Element\NodeElement|null
     */
    protected function getSubmittedForm($name)
    {
        $session = $this->getMink()->getSession('selenium2');
        $session->visit($this->base.'/fp_js_form_validator/javascript_unit_test/' . $name);
        var_dump($this->base.'/fp_js_form_validator/javascript_unit_test/' . $name);
        var_dump($session->getPage()->getHtml());
        $session->getPage()->findButton('form_submit')->click();
        $session->wait(5000,
            "FpJsFormValidatorFactory.forms.form.countProcessedRequests() == 0"
        );
        return $session->getPage()->find('css', 'form');
    }

    /**
     * @param \Behat\Mink\Element\NodeElement $element
{'fraction_non_alphanumeric': 0.16042780748663102, 'fraction_numerical': 0.012340600575894693, 'mean_word_length': 2.909967845659164, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 40, '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': '2876738', 'n_tokens_mistral': 792, 'n_tokens_neox': 762, 'n_words': 111}