Dieser Commit ist enthalten in:
Ursprung
2b21070b1a
Commit
f7a7c71f86
1583 geänderte Dateien mit 454759 neuen und 0 gelöschten Zeilen
29
tests/unit/application/views/helpers/GetServerProtocolTest.php
Normale Datei
29
tests/unit/application/views/helpers/GetServerProtocolTest.php
Normale Datei
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
require_once 'PHPUnit/Framework/TestCase.php';
|
||||
require_once 'GetServerProtocol.php';
|
||||
|
||||
/**
|
||||
* @group MsdViewHelper
|
||||
*/
|
||||
class GetServerProtocolTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testGetServerProtocolHTTP()
|
||||
{
|
||||
$expected='http://';
|
||||
$_SERVER['HTTPS'] = 'Off';
|
||||
$viewHelper = new Msd_View_Helper_GetServerProtocol();
|
||||
$res = $viewHelper->getServerProtocol();
|
||||
$this->assertEquals($expected, $res);
|
||||
}
|
||||
|
||||
public function testGetServerProtocolHTTPS()
|
||||
{
|
||||
$expected='https://';
|
||||
$_SERVER['HTTPS'] = 'On';
|
||||
$viewHelper = new Msd_View_Helper_GetServerProtocol();
|
||||
$res = $viewHelper->getServerProtocol();
|
||||
$this->assertEquals($expected, $res);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Laden …
Tabelle hinzufügen
Einen Link hinzufügen
In neuem Issue referenzieren