aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions_database_helper/fixtures
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-12-14 02:55:07 +0100
committerAndreas Fischer <bantu@phpbb.com>2012-12-14 02:55:07 +0100
commitf4df152b4b88d2c7e2866cc829059781d2aea437 (patch)
treecc337fc0493088a80bbab4740f8529f5b6a38236 /tests/functions_database_helper/fixtures
parent73e7fa8e8ee9c2db7874dbe18605d3a0aa59b86f (diff)
parenta686910958c0ca6eb64c7be10d60d1ebe15999c9 (diff)
downloadforums-f4df152b4b88d2c7e2866cc829059781d2aea437.tar
forums-f4df152b4b88d2c7e2866cc829059781d2aea437.tar.gz
forums-f4df152b4b88d2c7e2866cc829059781d2aea437.tar.bz2
forums-f4df152b4b88d2c7e2866cc829059781d2aea437.tar.xz
forums-f4df152b4b88d2c7e2866cc829059781d2aea437.zip
Merge remote-tracking branch 'p/ticket/11162' into develop-olympus
* p/ticket/11162: (22 commits) [ticket/11162] Reformat. [ticket/11162] Rename tricky updates to database helper. [ticket/11162] Use empty($queries). [ticket/11162] Review comments fixed. [ticket/11162] Reformat. [ticket/11162] Newlines to LF. [ticket/11162] Use correct functions. [ticket/11162] Account for notify_status. [ticket/11162] This test really only works for bookmarks. [ticket/11162] The test is not at all trivial. [ticket/11162] Add includes. [ticket/11162] Move to a separate file to avoid blowing out functions.php. [ticket/11162] No whitespace changes in olympus. [ticket/11162] Fix inaccurately copy pasted comment. [ticket/11162] Use phpbb_update_rows_avoiding_duplicates in mcp. [ticket/11162] Clarify that only the two tables actually work. [ticket/11162] Uncomment transactions. [ticket/11162] An implementation that actually works. [ticket/11162] Make count function upper case. [ticket/11162] Rename count variable name to remaining_rows. ...
Diffstat (limited to 'tests/functions_database_helper/fixtures')
-rw-r--r--tests/functions_database_helper/fixtures/bookmarks_duplicates.xml47
-rw-r--r--tests/functions_database_helper/fixtures/topics_watch_duplicates.xml80
2 files changed, 127 insertions, 0 deletions
diff --git a/tests/functions_database_helper/fixtures/bookmarks_duplicates.xml b/tests/functions_database_helper/fixtures/bookmarks_duplicates.xml
new file mode 100644
index 0000000000..d49f76b073
--- /dev/null
+++ b/tests/functions_database_helper/fixtures/bookmarks_duplicates.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_bookmarks">
+ <column>user_id</column>
+ <column>topic_id</column>
+
+ <!-- one entry for this topic -->
+ <row>
+ <value>1</value>
+ <value>1</value>
+ </row>
+
+ <!-- non-conflicting entries -->
+ <row>
+ <value>2</value>
+ <value>2</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>3</value>
+ </row>
+
+ <!-- conflicting entries -->
+ <row>
+ <value>1</value>
+ <value>4</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>5</value>
+ </row>
+
+ <!-- conflicting and non-conflicting entries -->
+ <row>
+ <value>1</value>
+ <value>6</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>7</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>6</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/functions_database_helper/fixtures/topics_watch_duplicates.xml b/tests/functions_database_helper/fixtures/topics_watch_duplicates.xml
new file mode 100644
index 0000000000..c387bb737a
--- /dev/null
+++ b/tests/functions_database_helper/fixtures/topics_watch_duplicates.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_topics_watch">
+ <column>user_id</column>
+ <column>topic_id</column>
+ <column>notify_status</column>
+
+ <!-- one entry for this topic -->
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ </row>
+
+ <!-- non-conflicting entries -->
+ <row>
+ <value>1</value>
+ <value>2</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>3</value>
+ <value>0</value>
+ </row>
+
+ <!-- conflicting entries, same notify status -->
+ <row>
+ <value>1</value>
+ <value>4</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>5</value>
+ <value>1</value>
+ </row>
+
+ <!-- conflicting entries, notify status 0 into 1 -->
+ <row>
+ <value>1</value>
+ <value>6</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>7</value>
+ <value>1</value>
+ </row>
+
+ <!-- conflicting entries, notify status 1 into 0 -->
+ <row>
+ <value>1</value>
+ <value>8</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>9</value>
+ <value>0</value>
+ </row>
+
+ <!-- conflicting and non-conflicting entries -->
+ <row>
+ <value>1</value>
+ <value>10</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>11</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>10</value>
+ <value>1</value>
+ </row>
+ </table>
+</dataset>