From b50c8848e6e86d0561c26c8da51e02cb374d81b9 Mon Sep 17 00:00:00 2001 From: addshore Date: Thu, 24 Mar 2016 14:11:58 +0000 Subject: [PATCH] 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 --- .../structure/SpecialPageFatalTest.php | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/phpunit/structure/SpecialPageFatalTest.php 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 ); + } + +} -- 2.20.1