@@ -11,6 +11,7 @@ public function test_homepage_default() {
11
11
'home ' ,
12
12
'post- ' . $ this ->post_id1 ,
13
13
'post- ' . $ this ->post_id2 ,
14
+ 'post- ' . $ this ->post_id3 ,
14
15
'user- ' . $ this ->user_id1 ,
15
16
'user- ' . $ this ->user_id2 ,
16
17
), Emitter::get_surrogate_keys () );
@@ -69,6 +70,57 @@ public function test_single_tag_without_posts() {
69
70
), Emitter::get_surrogate_keys () );
70
71
}
71
72
73
+ public function test_year_date_archive_with_posts () {
74
+ $ this ->go_to ( home_url ( '?year=2016 ' ) );
75
+ $ this ->assertArrayValues ( array (
76
+ 'archive ' ,
77
+ 'date ' ,
78
+ 'post- ' . $ this ->post_id1 ,
79
+ 'post- ' . $ this ->post_id2 ,
80
+ 'post- ' . $ this ->post_id3 ,
81
+ 'user- ' . $ this ->user_id1 ,
82
+ 'user- ' . $ this ->user_id2 ,
83
+ ), Emitter::get_surrogate_keys () );
84
+ }
85
+
86
+ public function test_year_date_archive_without_posts () {
87
+ $ this ->go_to ( home_url ( '?year=2015 ' ) );
88
+ $ this ->assertArrayValues ( array (), Emitter::get_surrogate_keys () );
89
+ }
90
+
91
+ public function test_month_date_archive_with_posts () {
92
+ $ this ->go_to ( home_url ( '?year=2016&monthnum=10 ' ) );
93
+ $ this ->assertArrayValues ( array (
94
+ 'archive ' ,
95
+ 'date ' ,
96
+ 'post- ' . $ this ->post_id1 ,
97
+ 'post- ' . $ this ->post_id2 ,
98
+ 'post- ' . $ this ->post_id3 ,
99
+ 'user- ' . $ this ->user_id1 ,
100
+ 'user- ' . $ this ->user_id2 ,
101
+ ), Emitter::get_surrogate_keys () );
102
+ }
103
+
104
+ public function test_month_date_archive_without_posts () {
105
+ $ this ->go_to ( home_url ( '?year=2015&monthnum=10 ' ) );
106
+ $ this ->assertArrayValues ( array (), Emitter::get_surrogate_keys () );
107
+ }
108
+
109
+ public function test_day_date_archive_with_posts () {
110
+ $ this ->go_to ( home_url ( '?year=2016&monthnum=10&day=15 ' ) );
111
+ $ this ->assertArrayValues ( array (
112
+ 'archive ' ,
113
+ 'date ' ,
114
+ 'post- ' . $ this ->post_id3 ,
115
+ 'user- ' . $ this ->user_id2 ,
116
+ ), Emitter::get_surrogate_keys () );
117
+ }
118
+
119
+ public function test_day_date_archive_without_posts () {
120
+ $ this ->go_to ( home_url ( '?year=2015&monthnum=10&day=15 ' ) );
121
+ $ this ->assertArrayValues ( array (), Emitter::get_surrogate_keys () );
122
+ }
123
+
72
124
public function test_search () {
73
125
$ this ->go_to ( home_url ( '/?s=foo ' ) );
74
126
$ this ->assertArrayValues ( array (
0 commit comments