Skip to content
Snippets Groups Projects
Commit 1a880282 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Test HTTP:getFirstPathElement

parent f0daf3e1
No related branches found
No related tags found
No related merge requests found
......@@ -416,4 +416,16 @@ class HTTPTest extends TestCase
$_SERVER = $original;
}
/**
* @covers SimpleSAML\Utils\HTTP::getFirstPathElement()
*/
public function testGetFirstPathElement()
{
$original = $_SERVER;
$_SERVER['SCRIPT_NAME'] = '/test/tmp.php';
$this->assertEquals(HTTP::getFirstPathElement(), '/test');
$this->assertEquals(HTTP::getFirstPathElement(false), 'test');
$_SERVER = $original;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment