From: addshore Date: Thu, 24 Mar 2016 14:11:58 +0000 (+0000) Subject: Introduce SpecialPageFatalTest X-Git-Tag: 1.34.0-rc.0~4619 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=b50c8848e6e86d0561c26c8da51e02cb374d81b9;p=lhc%2Fweb%2Fwiklou.git Introduce SpecialPageFatalTest This test makes sure that special pages do not fatal in their most basic form (anon user viewing the page). Depends-On: I3a9f5b315eb114cb12ea4071f8da9079f797fcf6 Change-Id: Ic675e92d8dd8f11fa67914d2ce1dc00a379106ca --- diff --git a/tests/phpunit/structure/SpecialPageFatalTest.php b/tests/phpunit/structure/SpecialPageFatalTest.php new file mode 100644 index 0000000000..abf1cddbbb --- /dev/null +++ b/tests/phpunit/structure/SpecialPageFatalTest.php @@ -0,0 +1,50 @@ +executeSpecialPage( $page, '', null, null, $user ); + } catch ( Exception $e ) { + // Exceptions are allowed + } + + // If the page fataled phpunit will have already died + $this->addToAssertionCount( 1 ); + } + +}