SimpleSAML\Test\Utils\HTTPTest::testCheckURLAllowedWithRegexWithoutDelimiters PHP Method

testCheckURLAllowedWithRegexWithoutDelimiters() public method

Test SimpleSAML\Utils\HTTP::checkURLAllowed(), with the regex as a subdomain of an evil domain.
    public function testCheckURLAllowedWithRegexWithoutDelimiters()
    {
        $original = $_SERVER;
        \SimpleSAML_Configuration::loadFromArray(array('trusted.url.domains' => array('app\\.example\\.com'), 'trusted.url.regex' => true), '[ARRAY]', 'simplesaml');
        $_SERVER['REQUEST_URI'] = '/module.php';
        $this->setExpectedException('SimpleSAML_Error_Exception');
        HTTP::checkURLAllowed('https://app.example.com.evil.com');
        $_SERVER = $original;
    }