public function AbstractProfilerStorageTest::testStoreSpecialCharsInUrl in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/Profiler/AbstractProfilerStorageTest.php \Symfony\Component\HttpKernel\Tests\Profiler\AbstractProfilerStorageTest::testStoreSpecialCharsInUrl()
File
- vendor/
symfony/ http-kernel/ Tests/ Profiler/ AbstractProfilerStorageTest.php, line 59
Class
Namespace
Symfony\Component\HttpKernel\Tests\ProfilerCode
public function testStoreSpecialCharsInUrl() {
// The storage accepts special characters in URLs (Even though URLs are not
// supposed to contain them)
$profile = new Profile('simple_quote');
$profile
->setUrl('http://foo.bar/\'');
$this
->getStorage()
->write($profile);
$this
->assertTrue(false !== $this
->getStorage()
->read('simple_quote'), '->write() accepts single quotes in URL');
$profile = new Profile('double_quote');
$profile
->setUrl('http://foo.bar/"');
$this
->getStorage()
->write($profile);
$this
->assertTrue(false !== $this
->getStorage()
->read('double_quote'), '->write() accepts double quotes in URL');
$profile = new Profile('backslash');
$profile
->setUrl('http://foo.bar/\\');
$this
->getStorage()
->write($profile);
$this
->assertTrue(false !== $this
->getStorage()
->read('backslash'), '->write() accepts backslash in URL');
$profile = new Profile('comma');
$profile
->setUrl('http://foo.bar/,');
$this
->getStorage()
->write($profile);
$this
->assertTrue(false !== $this
->getStorage()
->read('comma'), '->write() accepts comma in URL');
}