public function testImportMessages() { Message::importMessages(['Hello World!', 'Hello Piñata!']); $this->assertNotNull(Message::whereCode('hello.world')->first()); $this->assertNotNull(Message::whereCode('hello.piñata')->first()); Message::truncate(); }
public function onScanMessages() { if (post('purge_messages', false)) { Message::truncate(); } ThemeScanner::scan(); Flash::success(Lang::get('rainlab.translate::lang.messages.scan_messages_success')); return $this->onRefresh(); }
public function testImportMessagesCopiesFromDeprecated() { $this->seedDeprecatedData(); Message::importMessages(['Hello World!', 'Hello Piñata!']); $newMessage = Message::whereCode('hello.piñata')->first(); $deprecatedMessage = Message::whereCode('hello.pinata')->first(); $this->assertNotNull($newMessage); $this->assertEquals($newMessage->messageData, $deprecatedMessage->messageData); Message::truncate(); }