importer = new Importer(new NullConnection(), new NullConnection(), new L11nManager('Api')); } /** * @covers Modules\Exchange\Interfaces\OMS\Importer * @group module */ public function testLanguageImport() : void { $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; $request->setData('id', '123'); $request->setData('type', 'language'); if (!\is_file(__DIR__ . '/test_tmp.csv')) { \copy(__DIR__ . '/test.csv', __DIR__ . '/test_tmp.csv'); } TestUtils::setMember($request, 'files', [ 'file0' => [ 'name' => 'test.csv', 'type' => 'csv', 'tmp_name' => __DIR__ . '/test_tmp.csv', 'error' => \UPLOAD_ERR_OK, 'size' => \filesize(__DIR__ . '/test_tmp.csv'), ], ]); $export = $this->importer->importFromRequest($request); self::assertEquals( \date('Y-m-d'), \date('Y-m-d', \filemtime(__DIR__ . '/../../../../TestModule/Theme/Backend/Lang/en.lang.php')) ); } }