Skip to content

Commit c56bcd9

Browse files
author
Matthew Lewinski
committed
Fix unit test breakage from ProfilerStorageInterface change.
1 parent 8a8c733 commit c56bcd9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/Symfony/Tests/Component/HttpKernel/Profiler/SqliteProfilerStorageTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected function setUp()
4040
public function testStore()
4141
{
4242
for ($i = 0; $i < 10; $i ++) {
43-
self::$storage->write('token_'.$i, 'data', '127.0.0.1', 'http://foo.bar', time());
43+
self::$storage->write('token_'.$i, '', 'data', '127.0.0.1', 'http://foo.bar', time());
4444
}
4545
$this->assertEquals(count(self::$storage->find('127.0.0.1', 'http://foo.bar', 20)), 10, '->write() stores data in the database');
4646
}
@@ -49,9 +49,9 @@ public function testStoreSpecialCharsInUrl()
4949
{
5050
// The SQLite storage accepts special characters in URLs (Even though URLs are not
5151
// supposed to contain them)
52-
self::$storage->write('simple_quote', 'data', '127.0.0.1', 'http://foo.bar/\'', time());
53-
self::$storage->write('double_quote', 'data', '127.0.0.1', 'http://foo.bar/"', time());
54-
self::$storage->write('backslash', 'data', '127.0.0.1', 'http://foo.bar/\\', time());
52+
self::$storage->write('simple_quote', '', 'data', '127.0.0.1', 'http://foo.bar/\'', time());
53+
self::$storage->write('double_quote', '', 'data', '127.0.0.1', 'http://foo.bar/"', time());
54+
self::$storage->write('backslash', '', 'data', '127.0.0.1', 'http://foo.bar/\\', time());
5555

5656
$this->assertTrue(false !== self::$storage->read('simple_quote'), '->write() accepts single quotes in URL');
5757
$this->assertTrue(false !== self::$storage->read('double_quote'), '->write() accepts double quotes in URL');
@@ -60,13 +60,13 @@ public function testStoreSpecialCharsInUrl()
6060

6161
public function testStoreDuplicateToken()
6262
{
63-
$this->assertTrue(true === self::$storage->write('token', 'data', '127.0.0.1', 'http://foo.bar', time()), '->write() returns true when the token is unique');
64-
$this->assertTrue(false === self::$storage->write('token', 'data', '127.0.0.1', 'http://foo.bar', time()), '->write() return false when the token is already present in the DB');
63+
$this->assertTrue(true === self::$storage->write('token', '', 'data', '127.0.0.1', 'http://foo.bar', time()), '->write() returns true when the token is unique');
64+
$this->assertTrue(false === self::$storage->write('token', '', 'data', '127.0.0.1', 'http://foo.bar', time()), '->write() return false when the token is already present in the DB');
6565
}
6666

6767
public function testRetrieveByIp()
6868
{
69-
self::$storage->write('token', 'data', '127.0.0.1', 'http://foo.bar', time());
69+
self::$storage->write('token', '', 'data', '127.0.0.1', 'http://foo.bar', time());
7070

7171
$this->assertEquals(count(self::$storage->find('127.0.0.1', '', 10)), 1, '->find() retrieve a record by IP');
7272
$this->assertEquals(count(self::$storage->find('127.0.%.1', '', 10)), 0, '->find() does not interpret a "%" as a wildcard in the IP');
@@ -75,11 +75,11 @@ public function testRetrieveByIp()
7575

7676
public function testRetrieveByUrl()
7777
{
78-
self::$storage->write('simple_quote', 'data', '127.0.0.1', 'http://foo.bar/\'', time());
79-
self::$storage->write('double_quote', 'data', '127.0.0.1', 'http://foo.bar/"', time());
80-
self::$storage->write('backslash', 'data', '127.0.0.1', 'http://foo\\bar/', time());
81-
self::$storage->write('percent', 'data', '127.0.0.1', 'http://foo.bar/%', time());
82-
self::$storage->write('underscore', 'data', '127.0.0.1', 'http://foo.bar/_', time());
78+
self::$storage->write('simple_quote', '', 'data', '127.0.0.1', 'http://foo.bar/\'', time());
79+
self::$storage->write('double_quote', '', 'data', '127.0.0.1', 'http://foo.bar/"', time());
80+
self::$storage->write('backslash', '', 'data', '127.0.0.1', 'http://foo\\bar/', time());
81+
self::$storage->write('percent', '', 'data', '127.0.0.1', 'http://foo.bar/%', time());
82+
self::$storage->write('underscore', '', 'data', '127.0.0.1', 'http://foo.bar/_', time());
8383

8484
$this->assertEquals(count(self::$storage->find('127.0.0.1', 'http://foo.bar/\'', 10)), 1, '->find() accepts single quotes in URLs');
8585
$this->assertEquals(count(self::$storage->find('127.0.0.1', 'http://foo.bar/"', 10)), 1, '->find() accepts double quotes in URLs');

0 commit comments

Comments
 (0)