From 48932af7c5f4e64da254045e1365897bde6a2017 Mon Sep 17 00:00:00 2001 From: jgen Date: Mon, 17 Feb 2014 15:45:42 -0500 Subject: [PATCH] Working on testing the installer. --- tests/test_install.php | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/tests/test_install.php b/tests/test_install.php index 47aaef6c..86b991e5 100644 --- a/tests/test_install.php +++ b/tests/test_install.php @@ -1,28 +1,47 @@ options = getopt("d:"); - $this->database = $this->options["d"]; + $this->database = $db; + + if ($db === "mysql") { + $this->db_user = "travis"; + $this->db_pass = ""; + } elseif ($db === "pgsql") { + $this->db_user = "postgres"; + $this->db_pass = ""; + } } function testOptions() { - print_r($this->options); - $this->assertNotNull($this->database); + echo $this->database; + //$this->assertFalse(is_null($this->database)); } function installShimmie() { $this->get('http://127.0.0.1/'); $this->assertResponse(200); + $this->assertTitle("Shimmie Installation"); + $this->assertText("Database Install"); + + $this->setFieldById("database_type", $this->database); + $this->assertFieldByName("database_host", "localhost"); + $this->setFieldByName("database_user", $this->db_user); + $this->setFieldByName("database_password", $this->db_pass); + $this->assertFieldByName("database_name", "shimmie"); + } }