public function RequestTest::testIsXmlHttpRequest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/RequestTest.php \Symfony\Component\HttpFoundation\Tests\RequestTest::testIsXmlHttpRequest()
File
- vendor/
symfony/ http-foundation/ Tests/ RequestTest.php, line 1251
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testIsXmlHttpRequest() {
$request = new Request();
$this
->assertFalse($request
->isXmlHttpRequest());
$request->headers
->set('X-Requested-With', 'XMLHttpRequest');
$this
->assertTrue($request
->isXmlHttpRequest());
$request->headers
->remove('X-Requested-With');
$this
->assertFalse($request
->isXmlHttpRequest());
}