Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAINTENANCE] Added additional repository functional test instead of unit tests. #895

Merged
116 changes: 116 additions & 0 deletions Tests/Fixtures/Repository/collections.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<dataset>

<tx_dlf_collections>
<uid>1101</uid>
<pid>20000</pid>
<tstamp>1631279509</tstamp>
<crdate>1631279509</crdate>
<cruser_id>2</cruser_id>
<deleted>0</deleted>
<sys_language_uid>0</sys_language_uid>
<l18n_parent>0</l18n_parent>
<l18n_diffsource>
a:8:{s:5:"label";N;s:10:"index_name";N;s:8:"oai_name";N;s:11:"description";N;s:9:"documents";N;s:5:"owner";N;s:6:"status";N;s:16:"sys_language_uid";N;}
</l18n_diffsource>
<hidden>0</hidden>
<fe_group/>
<fe_cruser_id>0</fe_cruser_id>
<fe_admin_lock>0</fe_admin_lock>
<label>Musik</label>
<index_name>Musik</index_name>
<index_search/>
<oai_name>music</oai_name>
<description/>
<thumbnail/>
<priority>3</priority>
<documents>0</documents>
<owner>0</owner>
<status>0</status>
</tx_dlf_collections>

<tx_dlf_collections>
<uid>1102</uid>
<pid>20000</pid>
<tstamp>1631279509</tstamp>
<crdate>1631279509</crdate>
<cruser_id>2</cruser_id>
<deleted>0</deleted>
<sys_language_uid>0</sys_language_uid>
<l18n_parent>0</l18n_parent>
<l18n_diffsource>
a:8:{s:5:"label";N;s:10:"index_name";N;s:8:"oai_name";N;s:11:"description";N;s:9:"documents";N;s:5:"owner";N;s:6:"status";N;s:16:"sys_language_uid";N;}
</l18n_diffsource>
<hidden>0</hidden>
<fe_group/>
<fe_cruser_id>0</fe_cruser_id>
<fe_admin_lock>0</fe_admin_lock>
<label>Collection with single document</label>
<index_name>collection-with-single-document</index_name>
<index_search/>
<oai_name>collection-with-single-document</oai_name>
<description/>
<thumbnail/>
<priority>4</priority>
<documents>0</documents>
<owner>0</owner>
<status>0</status>
</tx_dlf_collections>

<tx_dlf_collections>
<uid>1103</uid>
<pid>20000</pid>
<tstamp>1631279509</tstamp>
<crdate>1631279509</crdate>
<cruser_id>2</cruser_id>
<deleted>0</deleted>
<sys_language_uid>0</sys_language_uid>
<l18n_parent>0</l18n_parent>
<l18n_diffsource>
a:8:{s:5:"label";N;s:10:"index_name";N;s:8:"oai_name";N;s:11:"description";N;s:9:"documents";N;s:5:"owner";N;s:6:"status";N;s:16:"sys_language_uid";N;}
</l18n_diffsource>
<hidden>0</hidden>
<fe_group/>
<fe_cruser_id>1</fe_cruser_id>
<fe_admin_lock>0</fe_admin_lock>
<label>Geschichte</label>
<index_name>Geschichte</index_name>
<index_search>*:*</index_search>
<oai_name>history</oai_name>
<description/>
<thumbnail/>
<priority>3</priority>
<documents>0</documents>
<owner>0</owner>
<status>0</status>
</tx_dlf_collections>

<tx_dlf_collections>
<uid>1104</uid>
<pid>20000</pid>
<tstamp>1631279509</tstamp>
<crdate>1631279509</crdate>
<cruser_id>2</cruser_id>
<deleted>0</deleted>
<sys_language_uid>0</sys_language_uid>
<l18n_parent>0</l18n_parent>
<l18n_diffsource>
a:8:{s:5:"label";N;s:10:"index_name";N;s:8:"oai_name";N;s:11:"description";N;s:9:"documents";N;s:5:"owner";N;s:6:"status";N;s:16:"sys_language_uid";N;}
</l18n_diffsource>
<hidden>0</hidden>
<fe_group/>
<fe_cruser_id>1</fe_cruser_id>
<fe_admin_lock>0</fe_admin_lock>
<label>Bildende Kunst</label>
<index_name>bildende-kunst</index_name>
<index_search/>
<oai_name></oai_name>
<description/>
<thumbnail/>
<priority>4</priority>
<documents>0</documents>
<owner>0</owner>
<status>0</status>
</tx_dlf_collections>

</dataset>
39 changes: 39 additions & 0 deletions Tests/Fixtures/Repository/mail.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<dataset>
<tx_dlf_mail>
<uid>101</uid>
<pid>30000</pid>
<deleted>0</deleted>
<sorting>10</sorting>
<mail>Mail</mail>
<name>Name</name>
<label>Mail-Label-1</label>
</tx_dlf_mail>
<tx_dlf_mail>
<uid>102</uid>
<pid>30000</pid>
<deleted>0</deleted>
<sorting>10</sorting>
<mail>Mail</mail>
<name>Name</name>
<label>Mail-Label-2</label>
</tx_dlf_mail>
<tx_dlf_mail>
<uid>103</uid>
<pid>20000</pid>
<deleted>0</deleted>
<sorting>10</sorting>
<mail>Mail</mail>
<name>Name</name>
<label>Mail-Label-3</label>
</tx_dlf_mail>
<tx_dlf_mail>
<uid>104</uid>
<pid>20000</pid>
<deleted>0</deleted>
<sorting>10</sorting>
<mail>Mail</mail>
<name>Name</name>
<label>Mail-Label-4</label>
</tx_dlf_mail>
</dataset>
223 changes: 223 additions & 0 deletions Tests/Fixtures/Repository/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
<?xml version="1.0" encoding="utf-8"?>
<dataset>
<tx_dlf_metadata>
<uid>5001</uid>
<pid>20000</pid>
<tstamp>1638557803</tstamp>
<crdate>1631532810</crdate>
<cruser_id>1</cruser_id>
<deleted>0</deleted>
<sys_language_uid>0</sys_language_uid>
<l18n_parent>0</l18n_parent>
<l18n_diffsource></l18n_diffsource>
<hidden>0</hidden>
<sorting>32</sorting>
<label>Titel</label>
<index_name>title</index_name>
<format>1</format>
<default_value></default_value>
<wrap></wrap>
<index_tokenized>0</index_tokenized>
<index_stored>1</index_stored>
<index_indexed>1</index_indexed>
<index_boost>1</index_boost>
<is_sortable>1</is_sortable>
<is_facet>0</is_facet>
<is_listed>1</is_listed>
<index_autocomplete>1</index_autocomplete>
<status>0</status>
</tx_dlf_metadata>

<tx_dlf_metadata>
<uid>5002</uid>
<pid>20000</pid>
<tstamp>1638557803</tstamp>
<crdate>1631532810</crdate>
<cruser_id>1</cruser_id>
<deleted>0</deleted>
<sys_language_uid>0</sys_language_uid>
<l18n_parent>0</l18n_parent>
<l18n_diffsource></l18n_diffsource>
<hidden>0</hidden>
<sorting>31</sorting>
<label>Sammlungen</label>
<index_name>collection</index_name>
<format>1</format>
<default_value></default_value>
<wrap></wrap>
<index_tokenized>1</index_tokenized>
<index_stored>0</index_stored>
<index_indexed>1</index_indexed>
<index_boost>1</index_boost>
<is_sortable>0</is_sortable>
<is_facet>1</is_facet>
<is_listed>0</is_listed>
<index_autocomplete>1</index_autocomplete>
<status>0</status>
</tx_dlf_metadata>

<tx_dlf_metadata>
<uid>5003</uid>
<pid>20000</pid>
<tstamp>1638557803</tstamp>
<crdate>1631532810</crdate>
<cruser_id>1</cruser_id>
<deleted>0</deleted>
<sys_language_uid>0</sys_language_uid>
<l18n_parent>0</l18n_parent>
<l18n_diffsource></l18n_diffsource>
<hidden>0</hidden>
<sorting>30</sorting>
<label>Untertitel</label>
<index_name>untertitel</index_name>
<format>1</format>
<default_value></default_value>
<wrap></wrap>
<index_tokenized>0</index_tokenized>
<index_stored>1</index_stored>
<index_indexed>1</index_indexed>
<index_boost>1</index_boost>
<is_sortable>1</is_sortable>
<is_facet>0</is_facet>
<is_listed>0</is_listed>
<index_autocomplete>1</index_autocomplete>
<status>0</status>
</tx_dlf_metadata>

<tx_dlf_metadata>
<uid>5004</uid>
<pid>20000</pid>
<tstamp>1638557803</tstamp>
<crdate>1631532810</crdate>
<cruser_id>1</cruser_id>
<deleted>0</deleted>
<sys_language_uid>0</sys_language_uid>
<l18n_parent>0</l18n_parent>
<l18n_diffsource></l18n_diffsource>
<hidden>0</hidden>
<sorting>29</sorting>
<label>Ort</label>
<index_name>ort</index_name>
<format>1</format>
<default_value></default_value>
<wrap></wrap>
<index_tokenized>0</index_tokenized>
<index_stored>1</index_stored>
<index_indexed>1</index_indexed>
<index_boost>1</index_boost>
<is_sortable>1</is_sortable>
<is_facet>0</is_facet>
<is_listed>0</is_listed>
<index_autocomplete>1</index_autocomplete>
<status>0</status>
</tx_dlf_metadata>

<tx_dlf_metadata>
<uid>5005</uid>
<pid>20000</pid>
<tstamp>1638557803</tstamp>
<crdate>1631532810</crdate>
<cruser_id>1</cruser_id>
<deleted>0</deleted>
<sys_language_uid>0</sys_language_uid>
<l18n_parent>0</l18n_parent>
<l18n_diffsource></l18n_diffsource>
<hidden>0</hidden>
<sorting>30</sorting>
<label>Autor</label>
<index_name>autor</index_name>
<format>1</format>
<default_value></default_value>
<wrap></wrap>
<index_tokenized>0</index_tokenized>
<index_stored>1</index_stored>
<index_indexed>1</index_indexed>
<index_boost>1</index_boost>
<is_sortable>1</is_sortable>
<is_facet>0</is_facet>
<is_listed>1</is_listed>
<index_autocomplete>1</index_autocomplete>
<status>0</status>
</tx_dlf_metadata>

<tx_dlf_metadata>
<uid>5006</uid>
<pid>20000</pid>
<tstamp>1638557803</tstamp>
<crdate>1631532810</crdate>
<cruser_id>1</cruser_id>
<deleted>0</deleted>
<sys_language_uid>0</sys_language_uid>
<l18n_parent>0</l18n_parent>
<l18n_diffsource></l18n_diffsource>
<hidden>0</hidden>
<sorting>30</sorting>
<label>Institution</label>
<index_name>institution</index_name>
<format>1</format>
<default_value></default_value>
<wrap></wrap>
<index_tokenized>0</index_tokenized>
<index_stored>1</index_stored>
<index_indexed>1</index_indexed>
<index_boost>1</index_boost>
<is_sortable>0</is_sortable>
<is_facet>0</is_facet>
<is_listed>1</is_listed>
<index_autocomplete>1</index_autocomplete>
<status>0</status>
</tx_dlf_metadata>

<tx_dlf_metadataformat>
<uid>5101</uid>
<pid>20000</pid>
<tstamp>1638557803</tstamp>
<crdate>1631532810</crdate>
<cruser_id>1</cruser_id>
<deleted>0</deleted>
<parent_id>5001</parent_id>
<encoded>5202</encoded> <!-- refers to tx_dlf_formats (it's a MODS field) -->
<xpath>concat(./mods:titleInfo/mods:nonSort," ",./mods:titleInfo/mods:title)</xpath>
<xpath_sorting>./mods:titleInfo/mods:title</xpath_sorting>
<mandatory>0</mandatory>
</tx_dlf_metadataformat>

<tx_dlf_metadataformat>
<uid>5102</uid>
<pid>20000</pid>
<tstamp>1638557803</tstamp>
<crdate>1631532810</crdate>
<cruser_id>1</cruser_id>
<deleted>0</deleted>
<parent_id>5002</parent_id>
<encoded>5202</encoded>
<xpath>./mods:relatedItem[@type="series"]/mods:titleInfo/mods:title[@lang="ger"]</xpath>
<xpath_sorting />
<mandatory>0</mandatory>
</tx_dlf_metadataformat>

<tx_dlf_formats>
<uid>5201</uid>
<pid>0</pid>
<tstamp>1638557803</tstamp>
<crdate>1631532810</crdate>
<cruser_id>1</cruser_id>
<deleted>0</deleted>
<type>ALTO</type>
<root>alto</root>
<namespace>http://www.loc.gov/standards/alto/ns-v2#</namespace>
<class>Kitodo\Dlf\Format\Alto</class>
</tx_dlf_formats>
<tx_dlf_formats>
<uid>5202</uid>
<pid>0</pid>
<tstamp>1638557803</tstamp>
<crdate>1631532810</crdate>
<cruser_id>1</cruser_id>
<deleted>0</deleted>
<type>MODS</type>
<root>mods</root>
<namespace>http://www.loc.gov/mods/v3</namespace>
<class>Kitodo\Dlf\Format\Mods</class>
</tx_dlf_formats>
</dataset>
Loading