_dir); foreach ($files as $file) { if (preg_match('/\.php$/', $file)) { Rhymix\Framework\Storage::delete($file); } } } public function _after() { $files = Rhymix\Framework\Storage::readDirectory(\RX_BASEDIR . $this->_dir); foreach ($files as $file) { if (preg_match('/\.php$/', $file)) { Rhymix\Framework\Storage::delete($file); } } } public function testConvertDirectory() { Rhymix\Framework\Parsers\LangParser::convertDirectory(\RX_BASEDIR . $this->_dir, ['ko', 'en']); $this->assertTrue(file_exists(\RX_BASEDIR . $this->_dir . '/ko.php')); $this->assertTrue(file_exists(\RX_BASEDIR . $this->_dir . '/en.php')); $this->assertFalse(file_exists(\RX_BASEDIR . $this->_dir . '/ja.php')); $this->assertFalse(file_exists(\RX_BASEDIR . $this->_dir . '/fr.php')); $lang = new stdClass; include \RX_BASEDIR . $this->_dir . '/ko.php'; $this->assertEquals('테스트 언어', $lang->testlang); $this->assertEquals('
HTML
내용
HTML
Content
HTML コンテンツ
', $lang->testhtml); $this->assertNull($lang->testarray ?? null); } }