public function UriSignerTest::testCheck in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/UriSignerTest.php \Symfony\Component\HttpKernel\Tests\UriSignerTest::testCheck()
File
- vendor/
symfony/ http-kernel/ Tests/ UriSignerTest.php, line 26
Class
Namespace
Symfony\Component\HttpKernel\TestsCode
public function testCheck() {
$signer = new UriSigner('foobar');
$this
->assertFalse($signer
->check('http://example.com/foo?_hash=foo'));
$this
->assertFalse($signer
->check('http://example.com/foo?foo=bar&_hash=foo'));
$this
->assertFalse($signer
->check('http://example.com/foo?foo=bar&_hash=foo&bar=foo'));
$this
->assertTrue($signer
->check($signer
->sign('http://example.com/foo')));
$this
->assertTrue($signer
->check($signer
->sign('http://example.com/foo?foo=bar')));
$this
->assertTrue($signer
->sign('http://example.com/foo?foo=bar&bar=foo') === $signer
->sign('http://example.com/foo?bar=foo&foo=bar'));
}