From 30b3871e3db064e502a9aea66cf84d95e6b135f4 Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Mon, 20 Jan 2014 15:28:21 -0800 Subject: [PATCH 1/6] Switching back to dev-master for testing --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c604569..53d3818 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "php": ">=5.3.0" }, "require-dev": { - "tedivm/dovecottesting": "0.0.1" + "tedivm/dovecottesting": "dev-master" }, "autoload": { "psr-0": {"Fetch": "src/"} From 223be1851770cd15af538a3066d020f2e003e4ef Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Mon, 20 Jan 2014 15:37:47 -0800 Subject: [PATCH 2/6] Telling composer to use any of the 1.x line of the Dovecot Test Package --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 53d3818..e80053b 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "php": ">=5.3.0" }, "require-dev": { - "tedivm/dovecottesting": "dev-master" + "tedivm/dovecottesting": "~1" }, "autoload": { "psr-0": {"Fetch": "src/"} From a2b41cd82cfce137027572084393392f3f5c25c7 Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Thu, 27 Feb 2014 00:09:56 -0800 Subject: [PATCH 3/6] Added test to prevent fatal error in certain error conditions --- tests/Fetch/Test/MessageTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Fetch/Test/MessageTest.php b/tests/Fetch/Test/MessageTest.php index da14bf6..0547414 100644 --- a/tests/Fetch/Test/MessageTest.php +++ b/tests/Fetch/Test/MessageTest.php @@ -184,6 +184,7 @@ public function testMoveToMailbox() // Get message from Test Folder $message = $server->getMessageByUid(1); + $this->assertInstanceOf('\Fetch\Message', $message, 'Server returned Message.'); // Switch to Sent folder, count messages $server->setMailBox('Sent'); From ef5f76d3524c991c526728e1dc4c649b317aed53 Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Thu, 27 Feb 2014 00:11:19 -0800 Subject: [PATCH 4/6] Added timezone and corrected path data Adding a timezone prevents errors on misconfigured systems when running, and the path correction automates the running of the dovecot testing package between tests. --- tests/bootstrap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 0f5786f..0c7604f 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -14,6 +14,7 @@ define('TESTING', true); define('TEST_USER', 'testuser'); define('TEST_PASSWORD', 'applesauce'); +date_default_timezone_set('UTC'); if(getenv('TRAVIS')) { @@ -23,7 +24,7 @@ define('TESTING_ENVIRONMENT', 'VAGRANT'); define('TESTING_SERVER_HOST', '172.31.1.2'); echo 'Initializing Environment using Vagrant' . PHP_EOL; - passthru('/bin/bash ' . __DIR__ . '/vendor/tedivm/dovecottesting/SetupEnvironment.sh'); + passthru('/bin/bash ' . __DIR__ . '/../vendor/tedivm/dovecottesting/SetupEnvironment.sh'); echo 'Environment Initialized' . PHP_EOL . PHP_EOL . PHP_EOL; } From 56dc838df9ffa7afbb5bf2487600810d6140474b Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Thu, 27 Feb 2014 00:12:28 -0800 Subject: [PATCH 5/6] Updated to dovecottesting 1.2 This lets us simplify our test script by not having to care about different ip addresses. --- composer.json | 2 +- tests/bootstrap.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index e80053b..0051a92 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "php": ">=5.3.0" }, "require-dev": { - "tedivm/dovecottesting": "~1" + "tedivm/dovecottesting": "~1.2" }, "autoload": { "psr-0": {"Fetch": "src/"} diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 0c7604f..534aaa9 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -14,15 +14,15 @@ define('TESTING', true); define('TEST_USER', 'testuser'); define('TEST_PASSWORD', 'applesauce'); +define('TESTING_SERVER_HOST', '172.31.1.2'); + date_default_timezone_set('UTC'); if(getenv('TRAVIS')) { define('TESTING_ENVIRONMENT', 'TRAVIS'); - define('TESTING_SERVER_HOST', '127.0.0.1'); }else{ define('TESTING_ENVIRONMENT', 'VAGRANT'); - define('TESTING_SERVER_HOST', '172.31.1.2'); echo 'Initializing Environment using Vagrant' . PHP_EOL; passthru('/bin/bash ' . __DIR__ . '/../vendor/tedivm/dovecottesting/SetupEnvironment.sh'); echo 'Environment Initialized' . PHP_EOL . PHP_EOL . PHP_EOL; From ffeca296de120d9f4320ac314fe0a325c5ef2df8 Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Thu, 27 Feb 2014 11:47:17 -0800 Subject: [PATCH 6/6] Added back distinct IP address for Travis and Vagrant --- tests/bootstrap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 534aaa9..7597f3a 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -14,15 +14,16 @@ define('TESTING', true); define('TEST_USER', 'testuser'); define('TEST_PASSWORD', 'applesauce'); -define('TESTING_SERVER_HOST', '172.31.1.2'); date_default_timezone_set('UTC'); if(getenv('TRAVIS')) { define('TESTING_ENVIRONMENT', 'TRAVIS'); + define('TESTING_SERVER_HOST', '127.0.0.1'); }else{ define('TESTING_ENVIRONMENT', 'VAGRANT'); + define('TESTING_SERVER_HOST', '172.31.1.2'); echo 'Initializing Environment using Vagrant' . PHP_EOL; passthru('/bin/bash ' . __DIR__ . '/../vendor/tedivm/dovecottesting/SetupEnvironment.sh'); echo 'Environment Initialized' . PHP_EOL . PHP_EOL . PHP_EOL;