3 declare(strict_types=1);
31 protected function setUp(): void
33 $ilDB_mock = $this->getMockBuilder(ilDBInterface::class)->getMock();
34 $this->ilDB = $ilDB_mock;
40 $content = [
"acc#:#acc_add_document_btn_label#:#Add Document",
"administration#:#adm_achievements#:#Achievements"];
44 $this->assertInstanceOf(\ilObjLanguageDBAccess::class, $ilObjLanguageDBAccess);
50 $content = [
"acc#:#acc_add_document_btn_label#:#Add Document",
"administration#:#adm_achievements#:#Achievements"];
55 $result = $ilObjLanguageDBAccess->insertLangEntries(
"lang/ilias_en.lang");
57 $this->assertIsArray($result);
63 $content = [
"acc#:#acc_add_document_btn_label#:#Add Document"];
67 $result = $ilObjLanguageDBAccess->insertLangEntries(
"lang/ilias_en.lang");
69 $this->assertArrayHasKey(
"acc", $result);
70 $this->assertArrayHasKey(
"acc_add_document_btn_label", $result[
"acc"]);
71 $this->assertEquals(
"Add Document", $result[
"acc"][
"acc_add_document_btn_label"]);
77 $content = [
"acc#:#acc_add_document_btn_label#:#Add Document"];
78 $local_changes = [
"acc"=>[
"acc_add_document_btn_label"=>
"Add Documents"]];
81 $result = $ilObjLanguageDBAccess->insertLangEntries(
"lang/ilias_en.lang");
83 $this->assertEquals(
"Add Documents", $result[
"acc"][
"acc_add_document_btn_label"]);
89 $content = [
"acc#:#acc_add_document_btn_label#:#Add Document"];
94 $this->ilDB->expects($this->once())->method(
"manipulate");
95 $result = $ilObjLanguageDBAccess->insertLangEntries(
"lang/ilias_en.lang");
101 $content = [
"acc#:#acc_add_document_btn_label#:#Add Document"];
102 $local_changes = [
"acc"=>[
"acc_add_document_btn_label"=>
"Add Documents"]];
106 $this->ilDB->expects($this->never())->method(
"manipulate");
107 $result = $ilObjLanguageDBAccess->insertLangEntries(
"lang/ilias_en.lang");
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
testInsertLangEntriesManipulateCalledNeverWhenEveryContentHasALocalChange()
testInsertLangEntriesLocalChangesAreNotOverwritten()
Class ilLanguageBaseTest.
testInsertLangEntriesManipulateCalledOnce()
testInsertLangEntriesReturnsArray()
testInsertLangEntriesReturnedArrayHasValuesFromContent()