<commit_before><?php

namespace WrapIt\Tests\Helpers;

use PHPUnit\Framework\TestCase;

use WrapIt\WrapIt;
use WrapIt\Exceptions\WrapItParameterException;
use WrapIt\Exceptions\WrapItResponseException;
use WrapIt\Helpers\WrapItPushHelper;

final class PushHelperTest extends TestCase {

    protected $wrapit;

    protected function setUp() {
        $this->wrapit = new WrapIt(array(
            "domain" => "test.wrapit.hu",
            "client_id" => "2f32225f2fca95e119e82b47bf1fa091",
            "client_secret" => "<KEY>"
        ));
    }

    public function testPushCorrectCreationWithToken() {
        $helper = new WrapItPushHelper($this->wrapit, "example_token");
    }

    /**
     * @expectedException \WrapIt\Exceptions\WrapItParameterException
     */
    public function testInvalidCredentials() {
        $helper = new WrapItPushHelper($this->wrapit);
    }

}
<commit_msg>Token<commit_after><?php

namespace WrapIt\Tests\Helpers;

use PHPUnit\Framework\TestCase;

use WrapIt\WrapIt;
use WrapIt\Exceptions\WrapItParameterException;
use WrapIt\Exceptions\WrapItResponseException;
use WrapIt\Helpers\WrapItPushHelper;

final class PushHelperTest extends TestCase {

    protected $wrapit;

    protected function setUp() {
        $this->wrapit = new WrapIt(array(
            "domain" => "test.wrapit.hu",
            "client_id" => "2f32225f2fca95e119e82b47bf1fa091",
            "client_secret" => "<KEY>"
        ));
    }

    public function testPushCorrectCreationWithToken() {
        $helper = new WrapItPushHelper($this->wrapit, "example_token");
    }

    public function testGenerateToken() {
        $helper = new WrapItPushHelper($this->wrapit);
    }

}

{'fraction_non_alphanumeric': 0.11249259917110717, 'fraction_numerical': 0.023682652457075192, 'mean_word_length': 3.3669250645994833, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, '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': '4647658', 'n_tokens_mistral': 560, 'n_tokens_neox': 534, 'n_words': 92}