<commit_before><?php
namespace App\Test\TestCase\Shell;

use App\Lib\Autotranscription;
use App\Shell\TranscriptionsShell;
use Cake\Core\Configure;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\ConsoleIntegrationTestCase;

class TranscriptionsShellTest extends ConsoleIntegrationTestCase
{
    public $fixtures = [
        'app.sentences',
        'app.transcriptions',
        'app.users',
        'app.contributions',
    ];

    public $io;
    public $TS;

    private function getAutotranscriptionMock() {
        $AT = $this->getMockBuilder(Autotranscription::class)
            ->setMethods([
                'jpn_Jpan_to_Hrkt_generate',
                'jpn_Jpan_to_Hrkt_validate',
                'cmn_detectScript',
            ])
            ->getMock();
        $AT->expects($this->any())
           ->method('jpn_Jpan_to_Hrkt_generate')
           ->will($this->returnValue('transcription in furigana'));
        $AT->expects($this->any())
           ->method('jpn_Jpan_to_Hrkt_validate')
           ->will($this->returnValue(true));
        $AT->expects($this->any())
           ->method('cmn_detectScript')
           ->will($this->returnValue('TEST'));

        return $AT;
    }
<commit_msg>Fix test in specific context<commit_after><?php
namespace App\Test\TestCase\Shell;

use App\Lib\Autotranscription;
use App\Shell\TranscriptionsShell;
use Cake\Core\Configure;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\ConsoleIntegrationTestCase;

class TranscriptionsShellTest extends ConsoleIntegrationTestCase
{
    public $fixtures = [
        'app.sentences',
        'app.transcriptions',
        'app.users',
        'app.contributions',
        'app.reindex_flags',
    ];

    public $io;
    public $TS;

    private function getAutotranscriptionMock() {
        $AT = $this->getMockBuilder(Autotranscription::class)
            ->setMethods([
                'jpn_Jpan_to_Hrkt_generate',
                'jpn_Jpan_to_Hrkt_validate',
                'cmn_detectScript',
            ])
            ->getMock();
        $AT->expects($this->any())
           ->method('jpn_Jpan_to_Hrkt_generate')
           ->will($this->returnValue('transcription in furigana'));
        $AT->expects($this->any())
           ->method('jpn_Jpan_to_Hrkt_validate')
           ->will($this->returnValue(true));
        $AT->expects($this->any())
           ->method('cmn_detectScript')
           ->will($this->returnValue('TEST'));

        return $AT;
    }

{'fraction_non_alphanumeric': 0.1372867587327376, 'fraction_numerical': 0.0, 'mean_word_length': 2.5035561877667143, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 39, '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': '2552321', 'n_tokens_mistral': 769, 'n_tokens_neox': 738, 'n_words': 105}