forked from kaliop-uk/ezmigrationbundle
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kaliop-uk#164 from damianz5/content_create_multilang
Multilang support for content create/update
- Loading branch information
Showing
6 changed files
with
295 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
Tests/dsl/bad/execution/UnitTestKO013_multilang_fields.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Fails by attempting creation of content in non-existing language. | ||
# NB: needs a follow-up migration to remove the created content type | ||
|
||
- | ||
type: content_type | ||
mode: create | ||
content_type_group: 1 | ||
identifier: kmb_test_13 | ||
name: Kaliop Migration Bundle Test Class 13 | ||
name_pattern: '<ezstring>' | ||
attributes: | ||
- | ||
type: ezstring | ||
name: ezstring | ||
identifier: ezstring | ||
- | ||
type: ezstring | ||
name: ezstring 2 | ||
identifier: ezstring_2 | ||
|
||
- | ||
type: language | ||
mode: create | ||
lang: abc-TA | ||
name: Kaliop Migration Bundle Language abc-TA | ||
|
||
- | ||
type: language | ||
mode: create | ||
lang: abc-TB | ||
name: Kaliop Migration Bundle Language abc-TB | ||
|
||
- | ||
type: content | ||
mode: create | ||
content_type: kmb_test_9 | ||
parent_location: 2 | ||
attributes: | ||
ezstring: | ||
abc-TA: hello world 4 abc-TA | ||
abc-TB: hello world 4 abc-TB | ||
ezstring_2: some non multilang value |
32 changes: 32 additions & 0 deletions
32
Tests/dsl/bad/execution/UnitTestKO014_multilang_fields_wrong_lang.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Fails by attempting creation of content in non-existing language. | ||
# NB: needs a follow-up migration to remove the created content type | ||
|
||
- | ||
type: content_type | ||
mode: create | ||
content_type_group: 1 | ||
identifier: kmb_test_14 | ||
name: Kaliop Migration Bundle Test Class 14 | ||
name_pattern: '<ezstring>' | ||
attributes: | ||
- | ||
type: ezstring | ||
name: ezstring | ||
identifier: ezstring | ||
|
||
- | ||
type: language | ||
mode: create | ||
lang: abd-TA | ||
name: Kaliop Migration Bundle Language abd-TA | ||
|
||
- | ||
type: content | ||
mode: create | ||
content_type: kmb_test_9 | ||
parent_location: 2 | ||
attributes: | ||
ezstring: | ||
abc-TA: hello world 4 abc-TA | ||
non-EXIST: hello world 4 non existing language | ||
|
44 changes: 44 additions & 0 deletions
44
Tests/dsl/bad/execution/UnitTestKO015_multilang_fields_missing_field.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Fails by attempting creation of content in non-existing language. | ||
# NB: needs a follow-up migration to remove the created content type | ||
|
||
- | ||
type: content_type | ||
mode: create | ||
content_type_group: 1 | ||
identifier: kmb_test_15 | ||
name: Kaliop Migration Bundle Test Class 15 | ||
name_pattern: '<ezstring>' | ||
attributes: | ||
- | ||
type: ezstring | ||
name: ezstring | ||
identifier: ezstring | ||
- | ||
type: ezstring | ||
name: ezstring 2 | ||
identifier: ezstring_2 | ||
|
||
- | ||
type: language | ||
mode: create | ||
lang: abe-TA | ||
name: Kaliop Migration Bundle Language abe-TA | ||
|
||
- | ||
type: language | ||
mode: create | ||
lang: abe-TB | ||
name: Kaliop Migration Bundle Language abe-TB | ||
|
||
|
||
- | ||
type: content | ||
mode: create | ||
content_type: kmb_test_9 | ||
parent_location: 2 | ||
attributes: | ||
ezstring: | ||
abe-TA: hello world 4 abe-TA | ||
abe-TB: hello world 4 abe-TB | ||
ezstring_2: | ||
abe-TB: hello world 4 abe-TB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters