added another host test

This commit is contained in:
Devin Smith 2015-11-04 16:23:17 -08:00
parent dbc73f5682
commit 4147978e99

View File

@ -125,4 +125,17 @@ class HostTest extends PHPUnit_Framework_TestCase {
$this->assertTrue(c::isCockpit());
$this->assertEquals('live', c::app()->envByHost(false));
}
public function testOldCockpit() {
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'] = 'dev.cockpit1.crunchr.co';
$this->assertTrue(c::isCockpit());
$this->assertEquals('beta', c::app()->envByHost(false));
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'] = 'live.cockpit1.crunchr.co';
$this->assertTrue(c::isCockpit());
$this->assertEquals('live', c::app()->envByHost(false));
}
}