-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-41707 add current unit test files to new repo
- Loading branch information
Showing
11 changed files
with
400 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
*~ | ||
*.swp | ||
/tags | ||
/TAGS | ||
/cscope.* | ||
/.patches/ | ||
/.idea/ | ||
/nbproject/ | ||
.DS_Store | ||
/.settings/ | ||
/.project | ||
/.buildpath | ||
/.cache |
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,40 @@ | ||
===== Moodle Download Tests ===== | ||
|
||
This folder contains 4 files that are used for unit testing | ||
Moodle download capabilities. | ||
|
||
**** !!!! !!!! !!!! ***** | ||
**** It's really important to keep this ***** | ||
**** files completely unmodified in order ***** | ||
**** to obtain coherent test results. ***** | ||
**** !!!! !!!! !!!! ***** | ||
|
||
File specs: | ||
|
||
* test.html: One test valid xhtml file containing UTF-8 chars | ||
and differend linefeeds mixed (unix, dos, mac). | ||
md5: 47250a973d1b88d9445f94db4ef2c97a | ||
size: 3137 | ||
|
||
* test.jpg: One test binary (image) file. | ||
md5: 2af180e813dc3f446a9bb7b6af87ce24 | ||
size: 39476 | ||
|
||
* downloadtests.zip: One zipped folder containing the previous | ||
two files (test.html and test.jpg) to be used to test | ||
the componentlib install functions. | ||
md5: 9e94f74b3efb1ff6cf075dc6b2abf15c | ||
size: 39481 | ||
|
||
* downloadtests.md5 : One text file, required by componentlib | ||
in order to download the previous zip file. | ||
md5: fde140a6d13cb0c671b1b9d190bf41ee | ||
size: 47 | ||
|
||
* rsstest.xml: One valid rss feed. | ||
md5: 8fd047914863bf9b3a4b1514ec51c32c | ||
size: 32188 | ||
|
||
That's all, happy Unit Testing! | ||
20071222 stronk7: initial version | ||
20071230 stronk7: added rss test file |
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,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<rss version="2.0"> | ||
<channel> | ||
<title>Behat Test Feed</title> | ||
<link>http://moodle.org/mod/forum/view.php?f=1</link> | ||
<description> | ||
This is a test feed. | ||
|
||
Moodle is a leading open-source course management system (CMS) - a software package designed to help educators create quality online courses. Such e-learning systems are sometimes also called Learning Management Systems (LMS) or Virtual Learning Environments (VLE). One of the main advantages of Moodle over other systems is a strong grounding in social constructionist pedagogy.</description> | ||
<generator>Moodle</generator> | ||
<copyright>&#169; 2013 moodle</copyright> | ||
<image> | ||
<url>http://moodle.org/pix/i/rsssitelogo.gif</url> | ||
<title>moodle</title> | ||
<link>http://moodle.org</link> | ||
<width>140</width> | ||
<height>35</height> | ||
</image> | ||
<item> | ||
<title>Feed item 1 title</title> | ||
<link>http://moodle.org/mod/forum/discuss.php?d=85629</link> | ||
<pubDate>Fri, 30 Nov 2007 16:47:33 WST</pubDate> | ||
<description>Item 1 description. | ||
<br /> | ||
More info. | ||
</description> | ||
<guid isPermaLink="true">http://moodle.org/mod/forum/discuss.php?d=85629</guid> | ||
</item> | ||
<item> | ||
<title>Feed item 2 title</title> | ||
<link>http://moodle.org/mod/forum/discuss.php?d=84296</link> | ||
<pubDate>Mon, 12 Nov 2007 16:58:29 WST</pubDate> | ||
<description>Item 2 description. | ||
<br /> | ||
More info. | ||
</description> | ||
<guid isPermaLink="true">http://moodle.org/mod/forum/discuss.php?d=84296</guid> | ||
</item> | ||
</channel> | ||
</rss> |
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 @@ | ||
downloadtests,9e94f74b3efb1ff6cf075dc6b2abf15c |
Binary file not shown.
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
if (isset($_GET['done']) and $_GET['done'] == 1) { | ||
echo 'done'; | ||
die; | ||
} | ||
|
||
$testurl = 'http://download.moodle.org/unittest/test_redir.php'; | ||
|
||
$redir = isset($_GET['redir']) ? $_GET['redir'] : 5; | ||
if ($redir > 10) { | ||
$redir = 10; | ||
} | ||
|
||
if ($redir <= 1) { | ||
$target = "$testurl?done=1"; | ||
} else { | ||
$redir--; | ||
$target = "$testurl?redir=$redir"; | ||
} | ||
|
||
header('HTTP/1.1 302 Found'); | ||
header("Location: $target"); |
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,15 @@ | ||
<?php | ||
|
||
$type = isset($_POST['type']) ? $_POST['type'] : (isset($_GET['type']) ? $_GET['type'] : (302)); | ||
|
||
$type = (int)$type; | ||
|
||
switch ($type) { | ||
case 301: header('HTTP/1.1 301 Moved Permanently'); break; | ||
case 303: header('HTTP/1.1 303 See Other'); break; | ||
case 307: header('HTTP/1.1 307 Temporary Redirect'); break; | ||
case 308: header('HTTP/1.1 308 Permanent Redirect'); break; | ||
default: header('HTTP/1.1 302 Found'); break; | ||
} | ||
|
||
header("Location: test_redir.php?done=1"); |