<commit_before><?php
class C02_Station_MediaCest extends CestAbstract
{
    /**
     * @before setupComplete
     * @before login
     */
    public function editMedia(FunctionalTester $I)
    {
        $I->wantTo('Upload a song to a station.');

        $station_id = $this->test_station->getId();

        $test_song_orig = APP_INCLUDE_ROOT.'/resources/error.mp3';
        $test_song = tempnam(sys_get_temp_dir(), 'azuracast');
        copy($test_song_orig, $test_song);

        $csrf = $this->di[\App\Csrf::class];
        $test_file = [
            'tmp_name'  => $test_song,
            'name'      => basename($test_song),
            'type'      => 'audio/mpeg',
            'size'      => filesize($test_song),
            'error'     => \UPLOAD_ERR_OK
        ];

        $I->sendPOST('/station/'.$station_id.'/files/upload', [
            'file' => '',
            'csrf' => $csrf->generate('files'),
            'flowIdentifier' => 'uploadtest',<commit_msg>Fix unit test<commit_after><?php
class C02_Station_MediaCest extends CestAbstract
{
    /**
     * @before setupComplete
     * @before login
     */
    public function editMedia(FunctionalTester $I)
    {
        $I->wantTo('Upload a song to a station.');

        $station_id = $this->test_station->getId();

        $test_song_orig = APP_INCLUDE_ROOT.'/resources/error.mp3';
        $test_song = tempnam(sys_get_temp_dir(), 'azuracast');
        copy($test_song_orig, $test_song);

        $csrf = $this->di[\App\Csrf::class];
        $test_file = [
            'tmp_name'  => $test_song,
            'name'      => basename($test_song),
            'type'      => 'audio/mpeg',
            'size'      => filesize($test_song),
            'error'     => \UPLOAD_ERR_OK
        ];

        $I->sendPOST('/station/'.$station_id.'/files/upload', [
            'file' => '',
            'csrf' => $csrf->generate('stations_files'),
            'flowIdentifier' => 'uploadtest',
{'fraction_non_alphanumeric': 0.1623009758602979, 'fraction_numerical': 0.0030816640986132513, 'mean_word_length': 2.1168, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6190938', 'n_tokens_mistral': 650, 'n_tokens_neox': 629, 'n_words': 95}