<commit_before><?php

class A3XFormsParserA3Test extends \PHPUnit_Framework_TestCase
{
    const TRANSACTION_ID = 1970322;
    const XFORMS_PATH    = 'tests/_data/xforms.xml';

    private $mock;

    protected function setUp()
    {
        $this->mock = Codeception\Util\Stub::construct('\professionalweb\paymentdrivers\a3\xforms\XFormsParserA3',
                array(
                'xml' => ''
        ));
    }

    protected function tearDown()
    {
        $this->mock = null;
    }

    // Test getters and setters
    public function testIt()
    {
        $xform = file_get_contents(__DIR__.'/../../'.self::XFORMS_PATH);
        $this->mock->setXMLData($xform);
        $this->assertEquals($xform, $this->mock->getXMLData());

        $this->assertNotEmpty($this->mock->getSchema());
        $this->assertNotEmpty($this->mock->getSubmission());
        $this->assertNotEmpty($this->mock->getInputs());
        $this->assertNotEmpty($this->mock->getErrors());
        $this->assertNotEmpty($this->mock->getBind());<commit_msg>Tests 3<commit_after><?php

class A3XFormsParserA3Test extends \PHPUnit_Framework_TestCase
{
    const TRANSACTION_ID = 1970322;
    const XFORMS_PATH    = 'tests/_data/xforms.xml';

    private $mock;

    protected function setUp()
    {
        $this->mock = Codeception\Util\Stub::construct('\professionalweb\paymentdrivers\a3\xforms\XFormsParserA3',
                array(
                'xml' => ''
        ));
    }

    protected function tearDown()
    {
        $this->mock = null;
    }

    // Test getters and setters
    public function testIt()
    {
        $xform = file_get_contents(__DIR__.'/../../'.self::XFORMS_PATH);
        if($xform===false) {
            $this->fail(__DIR__.'/../../'.self::XFORMS_PATH);
        }
        $this->mock->setXMLData($xform);
        $this->assertEquals($xform, $this->mock->getXMLData());

        $this->assertNotEmpty($this->mock->getSchema());
        $this->assertNotEmpty($this->mock->getSubmission());
        $this->assertNotEmpty($this->mock->getInputs());
        $this->assertNotEmpty($this->mock->getErrors());
        $this->assertNotEmpty($this->mock->getBind());
{'fraction_non_alphanumeric': 0.1690465223399355, 'fraction_numerical': 0.010594196222938737, 'mean_word_length': 2.632107023411371, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '2120010', 'n_tokens_mistral': 693, 'n_tokens_neox': 665, 'n_words': 86}