File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ protected function tearDown(): void {
3636 foreach ($ this ->wikis as $ wiki ) {
3737 $ wiki ['wiki ' ]->wikiDb ()->forceDelete ();
3838 $ wiki ['wiki ' ]->forceDelete ();
39+ $ wiki ['user ' ]->forceDelete ();
3940 }
4041 parent ::tearDown ();
4142 }
@@ -164,6 +165,27 @@ public function testGroupings()
164165 $ groups ,
165166 );
166167 }
168+ function testCreationStats () {
169+ $ mockJob = $ this ->createMock (Job::class);
170+ $ mockJob ->expects ($ this ->never ())->method ('fail ' );
171+
172+ $ job = new PlatformStatsSummaryJob ();
173+ $ job ->setJob ($ mockJob );
167174
175+ $ testWikis = [];
176+ $ testUsers = [];
168177
178+ $ stats = $ job ->getCreationStats ();
179+
180+ $ this ->assertEquals (
181+ [
182+ 'wikis_created_PT24H ' => 0 ,
183+ 'wikis_created_P30D ' => 0 ,
184+ 'users_created_PT24H ' => 0 ,
185+ 'users_created_P30D ' => 0 ,
186+ ],
187+ $ stats ,
188+ );
189+
190+ }
169191}
You can’t perform that action at this time.
0 commit comments