You are here

public function LinkDefaultProtocolTest::testHttpDefaultProtocolFromVariableConf in Link 7

The protocol is set to HTTP by default if a wrong protocol has been set.

File

tests/LinkDefaultProtocolTest.test, line 43

Class

LinkDefaultProtocolTest
Test setting a global protocol, and using it for links when needed.

Code

public function testHttpDefaultProtocolFromVariableConf() {
  variable_set('link_default_protocol', 'banana');
  try {
    link_ensure_valid_default_protocol();
  } catch (Exception $e) {
  }
  $protocol = variable_get('link_default_protocol');
  $this
    ->assertEqual($protocol, LINK_HTTP_PROTOCOL);
}