summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.26/modules/update/tests
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.26/modules/update/tests')
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.1_0.xml34
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.info11
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.module6
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.no-releases.xml2
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.1_0.xml34
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.info11
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.module6
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.1_0.xml34
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.info11
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.module6
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/drupal.0.xml34
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/drupal.1.xml51
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/drupal.2-sec.xml69
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/drupal.dev.xml50
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info10
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info11
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/update_test.info12
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/update_test.module191
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/update_test_basetheme.1_1-sec.xml52
-rw-r--r--kolab.org/www/drupal-7.26/modules/update/tests/update_test_subtheme.1_0.xml34
20 files changed, 669 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.1_0.xml b/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.1_0.xml
new file mode 100644
index 0000000..a168453
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.1_0.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>AAA Update test</title>
+<short_name>aaa_update_test</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>1</recommended_major>
+<supported_majors>1</supported_majors>
+<default_major>1</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/aaa_update_test</link>
+ <terms>
+ <term><name>Projects</name><value>Modules</value></term>
+ </terms>
+<releases>
+ <release>
+ <name>aaa_update_test 7.x-1.0</name>
+ <version>7.x-1.0</version>
+ <tag>DRUPAL-7--1-0</tag>
+ <version_major>1</version_major>
+ <version_patch>0</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/aaa_update_test-7-x-1-0-release</release_link>
+ <download_link>http://example.com/aaa_update_test-7.x-1.0.tar.gz</download_link>
+ <date>1250424521</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>1073741824</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+</releases>
+</project>
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.info b/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.info
new file mode 100644
index 0000000..8af9839
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.info
@@ -0,0 +1,11 @@
+name = AAA Update test
+description = Support module for update module testing.
+package = Testing
+core = 7.x
+hidden = TRUE
+
+; Information added by Drupal.org packaging script on 2014-01-15
+version = "7.26"
+project = "drupal"
+datestamp = "1389815930"
+
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.module b/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.module
new file mode 100644
index 0000000..4d67b8e
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.module
@@ -0,0 +1,6 @@
+<?php
+
+/**
+ * @file
+ * Dummy module for testing Update status.
+ */
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.no-releases.xml b/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.no-releases.xml
new file mode 100644
index 0000000..e266d49
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/aaa_update_test.no-releases.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<error>No release history was found for the requested project (aaa_update_test).</error>
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.1_0.xml b/kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.1_0.xml
new file mode 100644
index 0000000..bfdf196
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.1_0.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>BBB Update test</title>
+<short_name>bbb_update_test</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>1</recommended_major>
+<supported_majors>1</supported_majors>
+<default_major>1</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/bbb_update_test</link>
+ <terms>
+ <term><name>Projects</name><value>Modules</value></term>
+ </terms>
+<releases>
+ <release>
+ <name>bbb_update_test 7.x-1.0</name>
+ <version>7.x-1.0</version>
+ <tag>DRUPAL-7--1-0</tag>
+ <version_major>1</version_major>
+ <version_patch>0</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/bbb_update_test-7-x-1-0-release</release_link>
+ <download_link>http://example.com/bbb_update_test-7.x-1.0.tar.gz</download_link>
+ <date>1250424521</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>1073741824</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+</releases>
+</project>
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.info b/kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.info
new file mode 100644
index 0000000..928cfbc
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.info
@@ -0,0 +1,11 @@
+name = BBB Update test
+description = Support module for update module testing.
+package = Testing
+core = 7.x
+hidden = TRUE
+
+; Information added by Drupal.org packaging script on 2014-01-15
+version = "7.26"
+project = "drupal"
+datestamp = "1389815930"
+
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.module b/kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.module
new file mode 100644
index 0000000..4d67b8e
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/bbb_update_test.module
@@ -0,0 +1,6 @@
+<?php
+
+/**
+ * @file
+ * Dummy module for testing Update status.
+ */
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.1_0.xml b/kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.1_0.xml
new file mode 100644
index 0000000..1b9ba75
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.1_0.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>CCC Update test</title>
+<short_name>ccc_update_test</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>1</recommended_major>
+<supported_majors>1</supported_majors>
+<default_major>1</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/ccc_update_test</link>
+ <terms>
+ <term><name>Projects</name><value>Modules</value></term>
+ </terms>
+<releases>
+ <release>
+ <name>ccc_update_test 7.x-1.0</name>
+ <version>7.x-1.0</version>
+ <tag>DRUPAL-7--1-0</tag>
+ <version_major>1</version_major>
+ <version_patch>0</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/ccc_update_test-7-x-1-0-release</release_link>
+ <download_link>http://example.com/ccc_update_test-7.x-1.0.tar.gz</download_link>
+ <date>1250424521</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>1073741824</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+</releases>
+</project>
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.info b/kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.info
new file mode 100644
index 0000000..7b4a97a
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.info
@@ -0,0 +1,11 @@
+name = CCC Update test
+description = Support module for update module testing.
+package = Testing
+core = 7.x
+hidden = TRUE
+
+; Information added by Drupal.org packaging script on 2014-01-15
+version = "7.26"
+project = "drupal"
+datestamp = "1389815930"
+
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.module b/kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.module
new file mode 100644
index 0000000..4d67b8e
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/ccc_update_test.module
@@ -0,0 +1,6 @@
+<?php
+
+/**
+ * @file
+ * Dummy module for testing Update status.
+ */
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/drupal.0.xml b/kolab.org/www/drupal-7.26/modules/update/tests/drupal.0.xml
new file mode 100644
index 0000000..701e11e
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/drupal.0.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>Drupal</title>
+<short_name>drupal</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>7</recommended_major>
+<supported_majors>7</supported_majors>
+<default_major>7</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/drupal</link>
+ <terms>
+ <term><name>Projects</name><value>Drupal project</value></term>
+ </terms>
+<releases>
+ <release>
+ <name>Drupal 7.0</name>
+ <version>7.0</version>
+ <tag>DRUPAL-7-0</tag>
+ <version_major>7</version_major>
+ <version_patch>0</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/drupal-7-0-release</release_link>
+ <download_link>http://example.com/drupal-7-0.tar.gz</download_link>
+ <date>1250424521</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>1073741824</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+</releases>
+</project>
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/drupal.1.xml b/kolab.org/www/drupal-7.26/modules/update/tests/drupal.1.xml
new file mode 100644
index 0000000..de4cfd0
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/drupal.1.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>Drupal</title>
+<short_name>drupal</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>7</recommended_major>
+<supported_majors>7</supported_majors>
+<default_major>7</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/drupal</link>
+ <terms>
+ <term><name>Projects</name><value>Drupal project</value></term>
+ </terms>
+<releases>
+ <release>
+ <name>Drupal 7.1</name>
+ <version>7.1</version>
+ <tag>DRUPAL-7-1</tag>
+ <version_major>7</version_major>
+ <version_patch>1</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/drupal-7-1-release</release_link>
+ <download_link>http://example.com/drupal-7-1.tar.gz</download_link>
+ <date>1250424581</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>2147483648</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+ <release>
+ <name>Drupal 7.0</name>
+ <version>7.0</version>
+ <tag>DRUPAL-7-0</tag>
+ <version_major>7</version_major>
+ <version_patch>0</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/drupal-7-0-release</release_link>
+ <download_link>http://example.com/drupal-7-0.tar.gz</download_link>
+ <date>1250424521</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>1073741824</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+</releases>
+</project>
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/drupal.2-sec.xml b/kolab.org/www/drupal-7.26/modules/update/tests/drupal.2-sec.xml
new file mode 100644
index 0000000..1e68c8d
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/drupal.2-sec.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>Drupal</title>
+<short_name>drupal</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>7</recommended_major>
+<supported_majors>7</supported_majors>
+<default_major>7</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/drupal</link>
+ <terms>
+ <term><name>Projects</name><value>Drupal project</value></term>
+ </terms>
+<releases>
+ <release>
+ <name>Drupal 7.2</name>
+ <version>7.2</version>
+ <tag>DRUPAL-7-2</tag>
+ <version_major>7</version_major>
+ <version_patch>2</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/drupal-7-2-release</release_link>
+ <download_link>http://example.com/drupal-7-2.tar.gz</download_link>
+ <date>1250424641</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>4294967296</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ <term><name>Release type</name><value>Security update</value></term>
+ </terms>
+ </release>
+ <release>
+ <name>Drupal 7.1</name>
+ <version>7.1</version>
+ <tag>DRUPAL-7-1</tag>
+ <version_major>7</version_major>
+ <version_patch>1</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/drupal-7-1-release</release_link>
+ <download_link>http://example.com/drupal-7-1.tar.gz</download_link>
+ <date>1250424581</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>2147483648</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+ <release>
+ <name>Drupal 7.0</name>
+ <version>7.0</version>
+ <tag>DRUPAL-7-0</tag>
+ <version_major>7</version_major>
+ <version_patch>0</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/drupal-7-0-release</release_link>
+ <download_link>http://example.com/drupal-7-0.tar.gz</download_link>
+ <date>1250424521</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>1073741824</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+</releases>
+</project>
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/drupal.dev.xml b/kolab.org/www/drupal-7.26/modules/update/tests/drupal.dev.xml
new file mode 100644
index 0000000..49dcc3f
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/drupal.dev.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>Drupal</title>
+<short_name>drupal</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>7</recommended_major>
+<supported_majors>7</supported_majors>
+<default_major>7</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/drupal</link>
+ <terms>
+ <term><name>Projects</name><value>Drupal project</value></term>
+ </terms>
+<releases>
+ <release>
+ <name>Drupal 7.0</name>
+ <version>7.0</version>
+ <tag>DRUPAL-7-0</tag>
+ <version_major>7</version_major>
+ <version_patch>0</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/drupal-7-0-release</release_link>
+ <download_link>http://example.com/drupal-7-0.tar.gz</download_link>
+ <date>1250424521</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>1073741824</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+ <release>
+ <name>Drupal 7.x-dev</name>
+ <version>7.x-dev</version>
+ <tag>DRUPAL-7</tag>
+ <version_major>7</version_major>
+ <version_extra>dev</version_extra>
+ <status>published</status>
+ <release_link>http://example.com/drupal-7-x-dev-release</release_link>
+ <download_link>http://example.com/drupal-7.x-dev.tar.gz</download_link>
+ <date>1250424581</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>2147483648</filesize>
+ <terms>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+</releases>
+</project>
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info b/kolab.org/www/drupal-7.26/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info
new file mode 100644
index 0000000..3d506d7
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info
@@ -0,0 +1,10 @@
+name = Update test base theme
+description = Test theme which acts as a base theme for other test subthemes.
+core = 7.x
+hidden = TRUE
+
+; Information added by Drupal.org packaging script on 2014-01-15
+version = "7.26"
+project = "drupal"
+datestamp = "1389815930"
+
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info b/kolab.org/www/drupal-7.26/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info
new file mode 100644
index 0000000..40c2e44
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info
@@ -0,0 +1,11 @@
+name = Update test subtheme
+description = Test theme which uses update_test_basetheme as the base theme.
+core = 7.x
+base theme = update_test_basetheme
+hidden = TRUE
+
+; Information added by Drupal.org packaging script on 2014-01-15
+version = "7.26"
+project = "drupal"
+datestamp = "1389815930"
+
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/update_test.info b/kolab.org/www/drupal-7.26/modules/update/tests/update_test.info
new file mode 100644
index 0000000..3964e7f
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/update_test.info
@@ -0,0 +1,12 @@
+name = Update test
+description = Support module for update module testing.
+package = Testing
+version = VERSION
+core = 7.x
+hidden = TRUE
+
+; Information added by Drupal.org packaging script on 2014-01-15
+version = "7.26"
+project = "drupal"
+datestamp = "1389815930"
+
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/update_test.module b/kolab.org/www/drupal-7.26/modules/update/tests/update_test.module
new file mode 100644
index 0000000..6fe4bdd
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/update_test.module
@@ -0,0 +1,191 @@
+<?php
+
+/**
+ * @file
+ * Module for testing Update Manager functionality.
+ */
+
+/**
+ * Implements hook_system_theme_info().
+ */
+function update_test_system_theme_info() {
+ $themes['update_test_basetheme'] = drupal_get_path('module', 'update_test') . '/themes/update_test_basetheme/update_test_basetheme.info';
+ $themes['update_test_subtheme'] = drupal_get_path('module', 'update_test') . '/themes/update_test_subtheme/update_test_subtheme.info';
+ return $themes;
+}
+
+/**
+ * Implements hook_menu().
+ */
+function update_test_menu() {
+ $items = array();
+
+ $items['update-test'] = array(
+ 'title' => t('Update test'),
+ 'page callback' => 'update_test_mock_page',
+ 'access callback' => TRUE,
+ 'type' => MENU_CALLBACK,
+ );
+ $items['503-error'] = array(
+ 'title' => t('503 Service unavailable'),
+ 'page callback' => 'update_callback_service_unavailable',
+ 'access callback' => TRUE,
+ 'type' => MENU_CALLBACK,
+ );
+
+ return $items;
+}
+
+/**
+ * Implements hook_system_info_alter().
+ *
+ * Checks the 'update_test_system_info' variable and sees if we need to alter
+ * the system info for the given $file based on the setting. The setting is
+ * expected to be a nested associative array. If the key '#all' is defined, its
+ * subarray will include .info keys and values for all modules and themes on the
+ * system. Otherwise, the settings array is keyed by the module or theme short
+ * name ($file->name) and the subarrays contain settings just for that module or
+ * theme.
+ */
+function update_test_system_info_alter(&$info, $file) {
+ $setting = variable_get('update_test_system_info', array());
+ foreach (array('#all', $file->name) as $id) {
+ if (!empty($setting[$id])) {
+ foreach ($setting[$id] as $key => $value) {
+ $info[$key] = $value;
+ }
+ }
+ }
+}
+
+/**
+ * Implements hook_update_status_alter().
+ *
+ * Checks the 'update_test_update_status' variable and sees if we need to alter
+ * the update status for the given project based on the setting. The setting is
+ * expected to be a nested associative array. If the key '#all' is defined, its
+ * subarray will include .info keys and values for all modules and themes on the
+ * system. Otherwise, the settings array is keyed by the module or theme short
+ * name and the subarrays contain settings just for that module or theme.
+ */
+function update_test_update_status_alter(&$projects) {
+ $setting = variable_get('update_test_update_status', array());
+ if (!empty($setting)) {
+ foreach ($projects as $project_name => &$project) {
+ foreach (array('#all', $project_name) as $id) {
+ if (!empty($setting[$id])) {
+ foreach ($setting[$id] as $key => $value) {
+ $project[$key] = $value;
+ }
+ }
+ }
+ }
+ }
+}
+
+/**
+ * Page callback: Prints mock XML for the Update Manager module.
+ *
+ * The specific XML file to print depends on two things: the project we're
+ * trying to fetch data for, and the desired "availability scenario" for that
+ * project which we're trying to test. Before attempting to fetch this data (by
+ * checking for updates on the available updates report), callers need to define
+ * the 'update_test_xml_map' variable as an array, keyed by project name,
+ * indicating which availability scenario to use for that project.
+ *
+ * @param $project_name
+ * The project short name the update manager is trying to fetch data for (the
+ * fetch URLs are of the form: [base_url]/[project_name]/[core_version]).
+ *
+ * @see update_test_menu()
+ */
+function update_test_mock_page($project_name) {
+ $xml_map = variable_get('update_test_xml_map', FALSE);
+ if (isset($xml_map[$project_name])) {
+ $availability_scenario = $xml_map[$project_name];
+ }
+ elseif (isset($xml_map['#all'])) {
+ $availability_scenario = $xml_map['#all'];
+ }
+ else {
+ // The test didn't specify (for example, the webroot has other modules and
+ // themes installed but they're disabled by the version of the site
+ // running the test. So, we default to a file we know won't exist, so at
+ // least we'll get an empty page from readfile instead of a bunch of
+ // Drupal page output.
+ $availability_scenario = '#broken#';
+ }
+
+ $path = drupal_get_path('module', 'update_test');
+ readfile("$path/$project_name.$availability_scenario.xml");
+}
+
+/**
+ * Implements hook_archiver_info().
+ */
+function update_test_archiver_info() {
+ return array(
+ 'update_test_archiver' => array(
+ // This is bogus, we only care about the extensions for now.
+ 'class' => 'ArchiverUpdateTest',
+ 'extensions' => array('update-test-extension'),
+ ),
+ );
+}
+
+/**
+ * Implements hook_filetransfer_info().
+ */
+function update_test_filetransfer_info() {
+ // Define a mock file transfer method, to ensure that there will always be
+ // at least one method available in the user interface (regardless of the
+ // environment in which the update manager tests are run).
+ return array(
+ 'system_test' => array(
+ 'title' => t('Update Test FileTransfer'),
+ // This should be in an .inc file, but for testing purposes, it is OK to
+ // leave it in the main module file.
+ 'file' => 'update_test.module',
+ 'class' => 'UpdateTestFileTransfer',
+ 'weight' => -20,
+ ),
+ );
+}
+
+/**
+ * Mocks a FileTransfer object to test the settings form functionality.
+ */
+class UpdateTestFileTransfer {
+
+ /**
+ * Returns an UpdateTestFileTransfer object.
+ *
+ * @return
+ * A new UpdateTestFileTransfer object.
+ */
+ public static function factory() {
+ return new UpdateTestFileTransfer;
+ }
+
+ /**
+ * Returns a settings form with a text field to input a username.
+ */
+ public function getSettingsForm() {
+ $form = array();
+ $form['udpate_test_username'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Update Test Username'),
+ );
+ return $form;
+ }
+}
+
+/**
+ * Page callback: Displays an Error 503 (Service unavailable) page.
+ *
+ * @see update_test_menu()
+ */
+function update_callback_service_unavailable() {
+ drupal_add_http_header('Status', '503 Service unavailable');
+ print "503 Service Temporarily Unavailable";
+}
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/update_test_basetheme.1_1-sec.xml b/kolab.org/www/drupal-7.26/modules/update/tests/update_test_basetheme.1_1-sec.xml
new file mode 100644
index 0000000..5c11c03
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/update_test_basetheme.1_1-sec.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>Update test base theme</title>
+<short_name>update_test_basetheme</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>1</recommended_major>
+<supported_majors>1</supported_majors>
+<default_major>1</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/update_test_basetheme</link>
+ <terms>
+ <term><name>Projects</name><value>Themes</value></term>
+ </terms>
+<releases>
+ <release>
+ <name>update_test_basetheme 7.x-1.1</name>
+ <version>7.x-1.1</version>
+ <tag>DRUPAL-7--1-1</tag>
+ <version_major>1</version_major>
+ <version_patch>1</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/update_test_basetheme-7-x-1-1-release</release_link>
+ <download_link>http://example.com/update_test_basetheme-7.x-1.1.tar.gz</download_link>
+ <date>1250624521</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>1073763241</filesize>
+ <terms>
+ <term><name>Release type</name><value>Security update</value></term>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+ <release>
+ <name>update_test_basetheme 7.x-1.0</name>
+ <version>7.x-1.0</version>
+ <tag>DRUPAL-7--1-0</tag>
+ <version_major>1</version_major>
+ <version_patch>0</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/update_test_basetheme-7-x-1-0-release</release_link>
+ <download_link>http://example.com/update_test_basetheme-7.x-1.0.tar.gz</download_link>
+ <date>1250524521</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>1073741824</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+</releases>
+</project>
diff --git a/kolab.org/www/drupal-7.26/modules/update/tests/update_test_subtheme.1_0.xml b/kolab.org/www/drupal-7.26/modules/update/tests/update_test_subtheme.1_0.xml
new file mode 100644
index 0000000..5d04ec8
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/update/tests/update_test_subtheme.1_0.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>Update test subtheme</title>
+<short_name>update_test_subtheme</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>1</recommended_major>
+<supported_majors>1</supported_majors>
+<default_major>1</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/update_test_subtheme</link>
+ <terms>
+ <term><name>Projects</name><value>Themes</value></term>
+ </terms>
+<releases>
+ <release>
+ <name>update_test_subtheme 7.x-1.0</name>
+ <version>7.x-1.0</version>
+ <tag>DRUPAL-7--1-0</tag>
+ <version_major>1</version_major>
+ <version_patch>0</version_patch>
+ <status>published</status>
+ <release_link>http://example.com/update_test_subtheme-7-x-1-0-release</release_link>
+ <download_link>http://example.com/update_test_subtheme-7.x-1.0.tar.gz</download_link>
+ <date>1250524521</date>
+ <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+ <filesize>1073741824</filesize>
+ <terms>
+ <term><name>Release type</name><value>New features</value></term>
+ <term><name>Release type</name><value>Bug fixes</value></term>
+ </terms>
+ </release>
+</releases>
+</project>