From 669688006f7c7bd609c525004ab33fc614ecb4d5 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 19 Nov 2013 16:51:28 +0100 Subject: [PATCH 1/3] [extend/vote_test] Extend vote test to vote on poll --- tests/functional/portal_vote_poll_test.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/functional/portal_vote_poll_test.php b/tests/functional/portal_vote_poll_test.php index a2aa9401..0059004a 100644 --- a/tests/functional/portal_vote_poll_test.php +++ b/tests/functional/portal_vote_poll_test.php @@ -31,6 +31,12 @@ class phpbb_functional_portal_vote_poll_test extends \board3\portal\tests\testfr if (isset($data)) { $crawler = self::request('GET', 'app.php?portal'); + $form = $crawler->selectButton('Submit vote')->form(); + $form->setValues(array('vote_id' => array(1))); + $crawler = self::submit($form); + + // no errors should appear on portal + $crawler = self::request('GET', 'app.php?portal'); } } } From 045dcdb68688911afe5532f52c7ee5ad4fa54c5b Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 19 Nov 2013 17:05:31 +0100 Subject: [PATCH 2/3] [extend/vote_test] Add rewrite rule for app.php --- travis/setup-webserver.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/travis/setup-webserver.sh b/travis/setup-webserver.sh index af5a781b..6d2fe1e0 100755 --- a/travis/setup-webserver.sh +++ b/travis/setup-webserver.sh @@ -46,6 +46,10 @@ server { fastcgi_pass unix:$PHP_FPM_SOCK; include fastcgi_params; } + + location / { + try_files \$uri \$uri/ /app.php\$is_args\$args; + } } " | sudo tee $NGINX_CONF > /dev/null From 71a4315ffe83c0ef572c4fd6aefded3a75765786 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 19 Nov 2013 17:34:23 +0100 Subject: [PATCH 3/3] [extend/vote_test] Change links to portal to use correct format app.php/portal --- tests/functional/portal_no_error_test.php | 2 +- tests/functional/portal_vote_poll_test.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/functional/portal_no_error_test.php b/tests/functional/portal_no_error_test.php index d527206b..4fe68974 100644 --- a/tests/functional/portal_no_error_test.php +++ b/tests/functional/portal_no_error_test.php @@ -22,6 +22,6 @@ class phpbb_functional_portal_no_error_test extends \board3\portal\tests\testfra public function test_vanilla_board() { - $crawler = self::request('GET', 'app.php?portal'); + $crawler = self::request('GET', 'app.php/portal'); } } diff --git a/tests/functional/portal_vote_poll_test.php b/tests/functional/portal_vote_poll_test.php index 0059004a..ccd0d6df 100644 --- a/tests/functional/portal_vote_poll_test.php +++ b/tests/functional/portal_vote_poll_test.php @@ -30,13 +30,13 @@ class phpbb_functional_portal_vote_poll_test extends \board3\portal\tests\testfr if (isset($data)) { - $crawler = self::request('GET', 'app.php?portal'); + $crawler = self::request('GET', 'app.php/portal'); $form = $crawler->selectButton('Submit vote')->form(); $form->setValues(array('vote_id' => array(1))); $crawler = self::submit($form); // no errors should appear on portal - $crawler = self::request('GET', 'app.php?portal'); + $crawler = self::request('GET', 'app.php/portal'); } } }