Merge pull request #9595 from totten/master-extbatch-env
[civicrm-core.git] / tests / phpunit / WebTest / Release / InstallScript.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
81621fee 4 | CiviCRM version 4.7 |
6a488035 5 +--------------------------------------------------------------------+
15a4309a 6 | Copyright CiviCRM LLC (c) 2004-2017 |
6a488035
TO
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License along with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
d25dd0ee 25 */
6a488035 26
6a488035
TO
27require_once 'ReleaseTestCase.php';
28
4cbe18b8 29/**
4f1f1f2a
CW
30 * name of the class doesn't end with Test on purpose - this way this
31 * webtest is not picked up by the suite, since it needs to run
32 * on specially prepare sandbox
33 * more details: http://wiki.civicrm.org/confluence/display/CRMDOC/Release+testing+script
4cbe18b8
EM
34 * Class WebTest_Release_InstallScript
35 */
6a488035
TO
36class WebTest_Release_InstallScript extends WebTest_Release_ReleaseTestCase {
37
38 protected function setUp() {
39 parent::setUp();
40 }
41
00be9182 42 public function testInstall() {
6a488035
TO
43 $this->webtestLogin();
44 $this->open($this->settings->installURL);
45
46 $this->waitForTextPresent("Thanks for choosing to use CiviCRM! Please follow the instructions below to get CiviCRM installed.");
47 $this->type("mysql_server", $this->settings->civiDBServer);
48 $this->type("mysql_username", $this->settings->civiDBUser);
49 $this->type("mysql_password", $this->settings->civiDBPass);
50 $this->type("mysql_database", $this->settings->civiDBName);
51
52 $this->type("drupal_server", $this->settings->drupalDBServer);
53 $this->type("drupal_username", $this->settings->drupalDBUser);
54 $this->type("drupal_password", $this->settings->drupalDBPass);
55 $this->type("drupal_database", $this->settings->drupalDBName);
56
57 $this->click("xpath=//input[@value='Re-check requirements']");
58 $this->waitForPageToLoad($this->getTimeoutMsec());
59 $this->click("install_button");
60 $this->waitForPageToLoad($this->getTimeoutMsec());
61 // $this->assertTrue($this->isTextPresent("this will take a few minutes"));
62 $this->waitForTextPresent("CiviCRM has been successfully installed");
071a6d2e 63 $this->openCiviPage("dashboard", "reset=1");
6a488035
TO
64 $this->assertTrue($this->isTextPresent("CiviCRM Home"));
65 }
96025800 66
6a488035 67}