示例#1
0
 public function setUp()
 {
     parent::setUp();
     Director::setBaseURL('/');
     if (!self::$original_host) {
         self::$original_host = $_SERVER['HTTP_HOST'];
     }
     $_SERVER['HTTP_HOST'] = 'www.example.org';
 }
 public function setUp()
 {
     parent::setUp();
     Config::inst()->update('Director', 'alternate_base_url', '/');
     if (!self::$original_host) {
         self::$original_host = $_SERVER['HTTP_HOST'];
     }
     $_SERVER['HTTP_HOST'] = 'www.example.org';
 }
 public function setUp()
 {
     parent::setUp();
     Config::inst()->update('SilverStripe\\Control\\Director', 'alternate_base_url', '/');
     if (!self::$original_host) {
         self::$original_host = $_SERVER['HTTP_HOST'];
     }
     $_SERVER['HTTP_HOST'] = 'www.example.org';
     ShortcodeParser::get('default')->register('test_shortcode', function () {
         return 'test shortcode output';
     });
 }