Skip to content

Commit 150ad25

Browse files
committed
integration tests for increasing and decreasing timemaps
1 parent 2fc66c6 commit 150ad25

File tree

3 files changed

+205
-0
lines changed

3 files changed

+205
-0
lines changed
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<http://localhost:8080/index.php/Special:TimeMap/20130522211900/-1/Kevan_Lannister>; rel="self"; type="application/link-format"; from="Fri, 18 May 2007 02:25:50 GMT"; until="Wed, 10 Apr 2013 06:23:21 GMT",
2+
<http://localhost:8080/index.php/Special:TimeMap/20070518022550/-1/Kevan_Lannister>; rel="timemap"; type="application/link-format";from=""; until="",
3+
<http://localhost:8080/index.php/Special:TimeMap/20130410062321/1/Kevan_Lannister>; rel="timemap"; type="application/link-format";from="Wed, 22 May 2013 21:19:00 GMT"; until="Mon, 20 May 2019 18:24:19 GMT",
4+
<http://localhost:8080/index.php/Special:TimeGate/Kevan_Lannister>; rel="timegate",
5+
<http://localhost:8080/index.php/Kevan_Lannister>; rel="original latest-version",
6+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=2>; rel="memento"; datetime="Fri, 18 May 2007 02:25:50 GMT",
7+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=3>; rel="memento"; datetime="Fri, 18 May 2007 02:27:07 GMT",
8+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=4>; rel="memento"; datetime="Thu, 15 May 2008 03:18:34 GMT",
9+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=5>; rel="memento"; datetime="Sun, 24 May 2009 21:04:52 GMT",
10+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=6>; rel="memento"; datetime="Thu, 02 Jul 2009 16:47:10 GMT",
11+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=7>; rel="memento"; datetime="Mon, 03 Aug 2009 15:00:57 GMT",
12+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=8>; rel="memento"; datetime="Sun, 10 Jan 2010 14:22:56 GMT",
13+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=9>; rel="memento"; datetime="Sun, 10 Jan 2010 14:24:36 GMT",
14+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=10>; rel="memento"; datetime="Tue, 16 Mar 2010 12:24:00 GMT",
15+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=11>; rel="memento"; datetime="Tue, 22 Jun 2010 17:40:54 GMT",
16+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=12>; rel="memento"; datetime="Sat, 03 Jul 2010 19:24:25 GMT",
17+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=13>; rel="memento"; datetime="Sun, 12 Sep 2010 13:17:50 GMT",
18+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=14>; rel="memento"; datetime="Sun, 12 Sep 2010 13:18:27 GMT",
19+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=15>; rel="memento"; datetime="Sat, 13 Nov 2010 17:46:48 GMT",
20+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=16>; rel="memento"; datetime="Thu, 23 Dec 2010 16:59:36 GMT",
21+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=17>; rel="memento"; datetime="Sun, 17 Apr 2011 15:04:08 GMT",
22+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=18>; rel="memento"; datetime="Sun, 17 Apr 2011 15:06:44 GMT",
23+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=19>; rel="memento"; datetime="Sun, 17 Apr 2011 20:30:08 GMT",
24+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=20>; rel="memento"; datetime="Tue, 07 Jun 2011 23:19:11 GMT",
25+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=21>; rel="memento"; datetime="Fri, 01 Jul 2011 03:06:02 GMT",
26+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=22>; rel="memento"; datetime="Sat, 02 Jul 2011 14:39:32 GMT",
27+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=23>; rel="memento"; datetime="Sat, 02 Jul 2011 14:39:52 GMT",
28+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=24>; rel="memento"; datetime="Fri, 15 Jul 2011 19:52:08 GMT",
29+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=25>; rel="memento"; datetime="Tue, 19 Jul 2011 17:16:42 GMT",
30+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=26>; rel="memento"; datetime="Tue, 19 Jul 2011 22:10:14 GMT",
31+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=27>; rel="memento"; datetime="Tue, 19 Jul 2011 22:17:18 GMT",
32+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=28>; rel="memento"; datetime="Wed, 20 Jul 2011 00:16:28 GMT",
33+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=29>; rel="memento"; datetime="Fri, 22 Jul 2011 21:59:00 GMT",
34+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=30>; rel="memento"; datetime="Fri, 22 Jul 2011 22:01:33 GMT",
35+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=31>; rel="memento"; datetime="Sat, 23 Jul 2011 02:16:43 GMT",
36+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=32>; rel="memento"; datetime="Mon, 25 Jul 2011 02:09:26 GMT",
37+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=33>; rel="memento"; datetime="Tue, 09 Aug 2011 05:35:36 GMT",
38+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=34>; rel="memento"; datetime="Fri, 12 Aug 2011 04:13:59 GMT",
39+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=35>; rel="memento"; datetime="Fri, 12 Aug 2011 04:14:52 GMT",
40+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=36>; rel="memento"; datetime="Fri, 12 Aug 2011 14:12:26 GMT",
41+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=37>; rel="memento"; datetime="Wed, 24 Aug 2011 00:04:47 GMT",
42+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=38>; rel="memento"; datetime="Mon, 12 Sep 2011 05:54:36 GMT",
43+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=39>; rel="memento"; datetime="Tue, 04 Oct 2011 06:34:05 GMT",
44+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=40>; rel="memento"; datetime="Wed, 02 Nov 2011 20:07:47 GMT",
45+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=41>; rel="memento"; datetime="Wed, 02 Nov 2011 20:11:34 GMT",
46+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=42>; rel="memento"; datetime="Wed, 02 Nov 2011 20:12:23 GMT",
47+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=43>; rel="memento"; datetime="Wed, 02 Nov 2011 20:12:49 GMT",
48+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=44>; rel="memento"; datetime="Wed, 02 Nov 2011 20:16:44 GMT",
49+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=45>; rel="memento"; datetime="Wed, 02 Nov 2011 20:24:11 GMT",
50+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=46>; rel="memento"; datetime="Thu, 03 Nov 2011 09:40:06 GMT",
51+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=47>; rel="memento"; datetime="Tue, 15 Nov 2011 11:30:07 GMT",
52+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=48>; rel="memento"; datetime="Fri, 02 Dec 2011 22:05:43 GMT",
53+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=49>; rel="memento"; datetime="Mon, 05 Dec 2011 02:56:39 GMT",
54+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=50>; rel="memento"; datetime="Mon, 05 Dec 2011 14:19:02 GMT",
55+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=51>; rel="memento"; datetime="Mon, 05 Dec 2011 14:19:25 GMT",
56+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=52>; rel="memento"; datetime="Tue, 06 Dec 2011 15:10:09 GMT",
57+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=53>; rel="memento"; datetime="Tue, 06 Dec 2011 15:10:39 GMT",
58+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=54>; rel="memento"; datetime="Tue, 06 Dec 2011 22:50:32 GMT",
59+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=55>; rel="memento"; datetime="Fri, 16 Dec 2011 09:16:03 GMT",
60+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=56>; rel="memento"; datetime="Fri, 16 Dec 2011 09:17:30 GMT",
61+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=57>; rel="memento"; datetime="Fri, 16 Dec 2011 09:17:56 GMT",
62+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=58>; rel="memento"; datetime="Sat, 17 Dec 2011 13:56:30 GMT",
63+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=59>; rel="memento"; datetime="Sun, 18 Dec 2011 23:42:42 GMT",
64+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=60>; rel="memento"; datetime="Fri, 23 Dec 2011 16:38:04 GMT",
65+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=61>; rel="memento"; datetime="Fri, 23 Dec 2011 16:39:04 GMT",
66+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=62>; rel="memento"; datetime="Sun, 08 Jan 2012 14:00:42 GMT",
67+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=63>; rel="memento"; datetime="Sun, 08 Jan 2012 14:03:52 GMT",
68+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=64>; rel="memento"; datetime="Tue, 10 Jan 2012 22:37:22 GMT",
69+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=65>; rel="memento"; datetime="Tue, 10 Jan 2012 22:44:23 GMT",
70+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=66>; rel="memento"; datetime="Sat, 14 Jan 2012 20:42:51 GMT",
71+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=67>; rel="memento"; datetime="Sat, 14 Jan 2012 20:47:46 GMT",
72+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=68>; rel="memento"; datetime="Mon, 16 Jan 2012 22:36:20 GMT",
73+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=69>; rel="memento"; datetime="Mon, 16 Jan 2012 22:36:55 GMT",
74+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=70>; rel="memento"; datetime="Sun, 22 Jan 2012 22:42:43 GMT",
75+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=71>; rel="memento"; datetime="Sun, 22 Jan 2012 22:43:22 GMT",
76+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=72>; rel="memento"; datetime="Sun, 12 Feb 2012 13:17:45 GMT",
77+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=73>; rel="memento"; datetime="Wed, 15 Feb 2012 03:47:04 GMT",
78+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=74>; rel="memento"; datetime="Mon, 20 Feb 2012 02:59:28 GMT",
79+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=75>; rel="memento"; datetime="Thu, 23 Feb 2012 10:02:29 GMT",
80+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=76>; rel="memento"; datetime="Thu, 23 Feb 2012 10:04:52 GMT",
81+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=77>; rel="memento"; datetime="Thu, 23 Feb 2012 10:08:34 GMT",
82+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=78>; rel="memento"; datetime="Thu, 23 Feb 2012 10:10:13 GMT",
83+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=79>; rel="memento"; datetime="Thu, 23 Feb 2012 17:33:30 GMT",
84+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=80>; rel="memento"; datetime="Thu, 23 Feb 2012 17:36:24 GMT",
85+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=81>; rel="memento"; datetime="Thu, 23 Feb 2012 17:52:16 GMT",
86+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=82>; rel="memento"; datetime="Thu, 23 Feb 2012 18:19:12 GMT",
87+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=83>; rel="memento"; datetime="Thu, 23 Feb 2012 18:31:51 GMT",
88+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=84>; rel="memento"; datetime="Fri, 24 Feb 2012 16:22:41 GMT",
89+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=85>; rel="memento"; datetime="Mon, 27 Feb 2012 00:03:44 GMT",
90+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=86>; rel="memento"; datetime="Mon, 27 Feb 2012 22:30:53 GMT",
91+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=87>; rel="memento"; datetime="Tue, 06 Mar 2012 02:27:16 GMT",
92+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=88>; rel="memento"; datetime="Tue, 06 Mar 2012 02:28:47 GMT",
93+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=89>; rel="memento"; datetime="Sat, 10 Mar 2012 14:01:57 GMT",
94+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=90>; rel="memento"; datetime="Tue, 13 Mar 2012 13:28:34 GMT",
95+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=91>; rel="memento"; datetime="Tue, 13 Mar 2012 18:24:49 GMT",
96+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=92>; rel="memento"; datetime="Fri, 23 Mar 2012 18:33:34 GMT",
97+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=93>; rel="memento"; datetime="Thu, 29 Mar 2012 11:35:50 GMT",
98+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=94>; rel="memento"; datetime="Sun, 01 Apr 2012 16:47:48 GMT",
99+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=95>; rel="memento"; datetime="Fri, 13 Apr 2012 13:21:49 GMT",
100+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=96>; rel="memento"; datetime="Fri, 20 Apr 2012 08:29:37 GMT",
101+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=97>; rel="memento"; datetime="Fri, 20 Apr 2012 09:16:28 GMT",
102+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=98>; rel="memento"; datetime="Fri, 20 Apr 2012 09:39:12 GMT",
103+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=99>; rel="memento"; datetime="Tue, 24 Apr 2012 06:05:11 GMT",
104+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=100>; rel="memento"; datetime="Thu, 10 May 2012 08:55:43 GMT",
105+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=101>; rel="memento"; datetime="Wed, 23 May 2012 02:27:56 GMT",
106+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=102>; rel="memento"; datetime="Tue, 12 Jun 2012 06:15:11 GMT",
107+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=103>; rel="memento"; datetime="Wed, 13 Jun 2012 06:26:07 GMT",
108+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=104>; rel="memento"; datetime="Thu, 14 Jun 2012 14:35:42 GMT",
109+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=105>; rel="memento"; datetime="Thu, 14 Jun 2012 14:42:47 GMT",
110+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=106>; rel="memento"; datetime="Sat, 07 Jul 2012 18:30:13 GMT",
111+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=107>; rel="memento"; datetime="Wed, 29 Aug 2012 10:44:38 GMT",
112+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=108>; rel="memento"; datetime="Wed, 29 Aug 2012 10:46:39 GMT",
113+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=109>; rel="memento"; datetime="Wed, 29 Aug 2012 10:49:05 GMT",
114+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=110>; rel="memento"; datetime="Sat, 08 Sep 2012 19:35:16 GMT",
115+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=111>; rel="memento"; datetime="Sun, 09 Sep 2012 10:27:56 GMT",
116+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=112>; rel="memento"; datetime="Mon, 01 Oct 2012 03:37:03 GMT",
117+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=113>; rel="memento"; datetime="Mon, 01 Oct 2012 03:38:01 GMT",
118+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=114>; rel="memento"; datetime="Wed, 28 Nov 2012 19:40:08 GMT",
119+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=115>; rel="memento"; datetime="Fri, 08 Feb 2013 00:18:53 GMT",
120+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=116>; rel="memento"; datetime="Wed, 13 Mar 2013 16:47:21 GMT",
121+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=117>; rel="memento"; datetime="Wed, 10 Apr 2013 06:23:21 GMT"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<http://localhost:8080/index.php/Special:TimeMap/20130522211900/1/Kevan_Lannister>; rel="self"; type="application/link-format"; from="Thu, 23 May 2013 04:12:37 GMT"; until="Mon, 20 May 2019 18:24:19 GMT",
2+
<http://localhost:8080/index.php/Special:TimeMap/20130523041237/-1/Kevan_Lannister>; rel="timemap"; type="application/link-format";from="Fri, 18 May 2007 02:25:50 GMT"; until="Wed, 22 May 2013 21:19:00 GMT",
3+
<http://localhost:8080/index.php/Special:TimeMap/20190520182419/1/Kevan_Lannister>; rel="timemap"; type="application/link-format";from=""; until="",
4+
<http://localhost:8080/index.php/Special:TimeGate/Kevan_Lannister>; rel="timegate",
5+
<http://localhost:8080/index.php/Kevan_Lannister>; rel="original latest-version",
6+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=119>; rel="memento"; datetime="Thu, 23 May 2013 04:12:37 GMT",
7+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=120>; rel="memento"; datetime="Thu, 23 May 2013 22:01:24 GMT",
8+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=121>; rel="memento"; datetime="Sat, 15 Jun 2013 11:04:28 GMT",
9+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=122>; rel="memento"; datetime="Sun, 16 Jun 2013 21:28:35 GMT",
10+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=123>; rel="memento"; datetime="Fri, 09 Aug 2013 22:20:35 GMT",
11+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=124>; rel="memento"; datetime="Sun, 01 Sep 2013 20:00:44 GMT",
12+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=125>; rel="memento"; datetime="Mon, 02 Sep 2013 09:22:42 GMT",
13+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=126>; rel="memento"; datetime="Mon, 02 Sep 2013 09:23:04 GMT",
14+
<http://localhost:8080/index.php?title=Kevan_Lannister&oldid=127>; rel="memento"; datetime="Mon, 20 May 2019 18:24:19 GMT"

tests/integration/TimeMapTest.php

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,74 @@ public function testSimpleTimeMap() {
6161
$this->assertEquals( $entity, $expected_timemap_data );
6262

6363
}
64+
65+
/**
66+
* @group timemap
67+
*
68+
*/
69+
public function testSimpleIncreasingTimeMap() {
70+
71+
global $sessionCookieString;
72+
73+
$uagent = "Memento-Mediawiki-Plugin/Test";
74+
75+
$expected_timemap_file = getenv( 'TESTDATADIR' ) . '/expected_increasing_timemap.link';
76+
77+
$myfile = fopen($expected_timemap_file, "r") or die("cannot open $expected_timemap_file");
78+
$expected_timemap_data = fread($myfile, filesize($expected_timemap_file));
79+
fclose($myfile);
80+
81+
$urit = "http://localhost:8080/index.php/Special:TimeMap/20130522211900/1/Kevan_Lannister";
82+
83+
$curlCmd = "curl -v -s -A '$uagent' -b '$sessionCookieString' -k -i --url \"$urit\"";
84+
85+
$outputfile = __CLASS__ . '.' . __FUNCTION__ . '.' . self::$instance . '.txt';
86+
$debugfile = __CLASS__ . '.' . __FUNCTION__ . '-debug-' . self::$instance . '.txt';
87+
88+
$response = `$curlCmd 2> $debugfile | tee -a "$outputfile"`;
89+
90+
$headers = extractHeadersFromResponse( $response );
91+
$statusline = extractStatuslineFromResponse( $response );
92+
$entity = extractEntityFromResponse( $response );
93+
94+
$this->assertEquals( $statusline["code"], "200" );
95+
96+
$this->assertEquals( $entity, $expected_timemap_data );
97+
98+
}
99+
100+
/**
101+
* @group timemap
102+
*
103+
*/
104+
public function testSimpleDecreasingTimeMap() {
105+
106+
global $sessionCookieString;
107+
108+
$uagent = "Memento-Mediawiki-Plugin/Test";
109+
110+
$expected_timemap_file = getenv( 'TESTDATADIR' ) . '/expected_decreasing_timemap.link';
111+
112+
$myfile = fopen($expected_timemap_file, "r") or die("cannot open $expected_timemap_file");
113+
$expected_timemap_data = fread($myfile, filesize($expected_timemap_file));
114+
fclose($myfile);
115+
116+
$urit = "http://localhost:8080/index.php/Special:TimeMap/20130522211900/-1/Kevan_Lannister";
117+
118+
$curlCmd = "curl -v -s -A '$uagent' -b '$sessionCookieString' -k -i --url \"$urit\"";
119+
120+
$outputfile = __CLASS__ . '.' . __FUNCTION__ . '.' . self::$instance . '.txt';
121+
$debugfile = __CLASS__ . '.' . __FUNCTION__ . '-debug-' . self::$instance . '.txt';
122+
123+
$response = `$curlCmd 2> $debugfile | tee -a "$outputfile"`;
124+
125+
$headers = extractHeadersFromResponse( $response );
126+
$statusline = extractStatuslineFromResponse( $response );
127+
$entity = extractEntityFromResponse( $response );
128+
129+
$this->assertEquals( $statusline["code"], "200" );
130+
131+
$this->assertEquals( $entity, $expected_timemap_data );
132+
133+
}
64134
}

0 commit comments

Comments
 (0)