<commit_before><?php
/**
 * This file is part of the PHP-EET package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @license MIT
 * @author <NAME> <<EMAIL>>
 */

namespace Tests;

use FilipSedivy\EET\Certificate;
use FilipSedivy\EET\Dispatcher;
use FilipSedivy\EET\Exceptions\EetException;
use FilipSedivy\EET\Receipt;
use FilipSedivy\EET\Utils\UUID;

class DispatcherTest extends \PHPUnit_Framework_TestCase
{
    public function testSendReceipt()
    {
        $certificate = new Certificate(__DIR__."/../examples/EET_CA1_Playground-CZ00000019.p12", "eet");
        $dispatcher = new Dispatcher($certificate);
        $dispatcher->setPlaygroundService();

        $uuid = UUID::v4();

        $r = new Receipt();
        $r->uuid_zpravy = $uuid;
        $r->id_provoz = '11';
        $r->id_pokl = 'IP105';
        $r->dic_popl = 'CZ1212121218';
        $r->porad_cis = '1';
        $r->dat_trzby = new \DateTime();
        $r->celk_trzba = 500;

        try{
            $dispatcher->send($r);
            print "FIK: ".$dispatcher->getFik()."\n";
            print "BKP: ".$dispatcher->getBkp()."\n";
            $this->assertTrue( is_string($dispatcher->getFik()) && is_string($dispatcher->getBkp()) );
        }catch(EetException $ex){
            $this->expectOutputString("PKP: ".$dispatcher->getPkp());
            $this->expectOutputString("BKP: ".$dispatcher->getBkp());
            $this->assertTrue( is_string($dispatcher->getPkp()) && is_string($dispatcher->getBkp()) );
        }catch(\Exception $ex){
            $this->fail();
        }
    }


}<commit_msg>Úprava výpisu<commit_after><?php
/**
 * This file is part of the PHP-EET package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @license MIT
 * @author <NAME> <<EMAIL>>
 */

namespace Tests;

use FilipSedivy\EET\Certificate;
use FilipSedivy\EET\Dispatcher;
use FilipSedivy\EET\Exceptions\EetException;
use FilipSedivy\EET\Receipt;
use FilipSedivy\EET\Utils\UUID;

class DispatcherTest extends \PHPUnit_Framework_TestCase
{
    public function testSendReceipt()
    {
        $certificate = new Certificate(__DIR__."/../examples/EET_CA1_Playground-CZ00000019.p12", "eet");
        $dispatcher = new Dispatcher($certificate);
        $dispatcher->setPlaygroundService();

        $uuid = UUID::v4();

        $r = new Receipt();
        $r->uuid_zpravy = $uuid;
        $r->id_provoz = '11';
        $r->id_pokl = 'IP105';
        $r->dic_popl = 'CZ1212121218';
        $r->porad_cis = '1';
        $r->dat_trzby = new \DateTime();
        $r->celk_trzba = 500;

        print "\n--- EET ---\n";
        try{
            $dispatcher->send($r);
            print "FIK: ".$dispatcher->getFik()."\n";
            print "BKP: ".$dispatcher->getBkp()."\n";
            $this->assertTrue( is_string($dispatcher->getFik()) && is_string($dispatcher->getBkp()) );
        }catch(EetException $ex){
            print "PKP: ".$dispatcher->getPkp()."\n";
            print "BKP: ".$dispatcher->getBkp()."\n";
            $this->assertTrue( is_string($dispatcher->getPkp()) && is_string($dispatcher->getBkp()) );
        }catch(\Exception $ex){
            $this->fail();
        }
    }


}
{'fraction_non_alphanumeric': 0.168685376661743, 'fraction_numerical': 0.018316100443131464, 'mean_word_length': 2.6724511930585684, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 57, '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': '4977979', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1171, 'n_words': 219}