<commit_before><?php
namespace CsvMigrations\Test\TestCase\Utility;

use Burzum\FileStorage\Model\Entity\FileStorage;
use Burzum\FileStorage\Storage\Listener\LocalListener;
use Burzum\FileStorage\Storage\StorageManager;
use Cake\Datasource\ResultSetInterface;
use Cake\Event\EventManager;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use CsvMigrations\Utility\FileUpload;

/**
 * CsvMigrations\Utility\Import Test Case
 */
class FileUploadTest extends TestCase
{
    public $fixtures = [
        'plugin.CsvMigrations.file_storage'
    ];

    private $table;
    private $fileUpload;

    public function setUp() : void
    {
        parent::setUp();
        StorageManager::setConfig('Local', [
            'adapterOptions' => [TMP, true],
            'adapterClass' => '\Gaufrette\Adapter\Local',
            'class' => '\Gaufrette\Filesystem'
        ]);

        // @link https://github.com/burzum/cakephp-file-storage/blob/master/docs/Documentation/Included-Event-Listeners.md
        EventManager::instance()->on(new LocalListener([
            'imageProcessing' => true,
            'pathBuilderOptions' => [
                'pathPrefix' => '/uploads'
            ]
        ]));

        $this->table = TableRegistry::get('Burzum/FileStorage.FileStorage');
        $this->fileUpload = new FileUpload(TableRegistry::get('Articles'));
    }

    public function tearDown() : void
    {
        unset($this->fileUpload);
        unset($this->table);

        parent::tearDown();
    }<commit_msg>Fixed invalid function call in tests (task #8246)<commit_after><?php
namespace CsvMigrations\Test\TestCase\Utility;

use Burzum\FileStorage\Model\Entity\FileStorage;
use Burzum\FileStorage\Storage\Listener\LocalListener;
use Burzum\FileStorage\Storage\StorageManager;
use Cake\Datasource\ResultSetInterface;
use Cake\Event\EventManager;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use CsvMigrations\Utility\FileUpload;

/**
 * CsvMigrations\Utility\Import Test Case
 */
class FileUploadTest extends TestCase
{
    public $fixtures = [
        'plugin.CsvMigrations.file_storage'
    ];

    private $table;
    private $fileUpload;

    public function setUp() : void
    {
        parent::setUp();
        StorageManager::config('Local', [
            'adapterOptions' => [TMP, true],
            'adapterClass' => '\Gaufrette\Adapter\Local',
            'class' => '\Gaufrette\Filesystem'
        ]);

        // @link https://github.com/burzum/cakephp-file-storage/blob/master/docs/Documentation/Included-Event-Listeners.md
        EventManager::instance()->on(new LocalListener([
            'imageProcessing' => true,
            'pathBuilderOptions' => [
                'pathPrefix' => '/uploads'
            ]
        ]));

        $this->table = TableRegistry::get('Burzum/FileStorage.FileStorage');
        $this->fileUpload = new FileUpload(TableRegistry::get('Articles'));
    }

    public function tearDown() : void
    {
        unset($this->fileUpload);
        unset($this->table);

        parent::tearDown();
    }
{'fraction_non_alphanumeric': 0.13435763321346844, 'fraction_numerical': 0.0013076168682576005, 'mean_word_length': 2.9130434782608696, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 2, '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': '2222671', 'n_tokens_mistral': 917, 'n_tokens_neox': 894, 'n_words': 141}