getData()); $this->assertEquals($this->getJSON(), $data, 'Failed to parse VTT file'); $this->assertEquals( trim(preg_replace('/\r\n|\r|\n/', "\r\n", $this->getExportedData())), trim(preg_replace('/\r\n|\r|\n/', "\r\n", VttConverter::export($data))), 'Failed to export VTT file' ); } public function test_exceptions() { $this->checkException( closure: function () { $text = << 00:00:21 test VTT; return VttConverter::parse($text); }, reason: 'Invalid VTT file', exception: \InvalidArgumentException::class, ); } }