<commit_before><?php

namespace atk4\core\tests;

use atk4\core\AppScopeTrait;
use atk4\core\TranslatableTrait;
use PHPUnit\Framework\TestCase;

class TranslatableTraitTest extends TestCase
{
    /**
     * Basic test for usage in ATK without external translator
     *
     * @dataProvider getTransSimpleTest
     */
    public function testTranslatableTrait($excepted, $message, $parameters)
    {
        $mock = new TranslatableMock();

        $result = $mock->_($message, $parameters);
        $this->assertEquals($excepted, $result);
    }

    /**
     * Basic test for usage in ATK with App without external translator
     *
     * @dataProvider getTransSimpleTest
     */
    public function testTranslatableTraitWithApp($excepted, $message, $parameters)
    {
        $app  = new AppScopeMock();
        $mock = new TranslatableMock();

        $app->add($mock);

        $result = $mock->_($message, $parameters);
        $this->assertEquals($excepted, $result);
    }<commit_msg>small changes<commit_after><?php

namespace atk4\core\tests;

use atk4\core\AppScopeTrait;
use atk4\core\TranslatableTrait;
use PHPUnit\Framework\TestCase;

class TranslatableTraitTest extends TestCase
{
    /**
     * Basic test for usage in ATK without external translator
     *
     * @dataProvider getTransSimpleTest
     */
    public function testTranslatableTrait($excepted, $message, $parameters)
    {
        $mock = new TranslatableMock();

        $result = $mock->_($message, $parameters);
        $this->assertEquals($excepted, $result);
    }

    /**
     * Basic test for usage in ATK with App without external translator
     *
     * @dataProvider getTransSimpleTest
     */
    public function testTranslatableTraitWithApp($excepted, $message, $parameters)
    {
        $app  = new AppScopeMock();
        $app->app = $app;
        $mock = new TranslatableMock();

        $app->add($mock);

        $result = $mock->_($message, $parameters);
        $this->assertEquals($excepted, $result);
    }
{'fraction_non_alphanumeric': 0.11829025844930417, 'fraction_numerical': 0.002982107355864811, 'mean_word_length': 2.9625984251968505, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '3494970', 'n_tokens_mistral': 598, 'n_tokens_neox': 586, 'n_words': 137}