[HttpKernel] Replace sha1 with sha256 in recently added tests.
This commit is contained in:
parent
35a0ee6f03
commit
255544f194
@ -609,12 +609,11 @@ class HttpCacheTest extends HttpCacheTestCase
|
|||||||
$values = $this->getMetaStorageValues();
|
$values = $this->getMetaStorageValues();
|
||||||
$this->assertCount(1, $values);
|
$this->assertCount(1, $values);
|
||||||
$tmp = unserialize($values[0]);
|
$tmp = unserialize($values[0]);
|
||||||
$time = \DateTime::createFromFormat('U', time());
|
|
||||||
$tmp[0][1]['date'] = \DateTime::createFromFormat('U', time() - 5)->format(DATE_RFC2822);
|
$tmp[0][1]['date'] = \DateTime::createFromFormat('U', time() - 5)->format(DATE_RFC2822);
|
||||||
$r = new \ReflectionObject($this->store);
|
$r = new \ReflectionObject($this->store);
|
||||||
$m = $r->getMethod('save');
|
$m = $r->getMethod('save');
|
||||||
$m->setAccessible(true);
|
$m->setAccessible(true);
|
||||||
$m->invoke($this->store, 'md'.sha1('http://localhost/'), serialize($tmp));
|
$m->invoke($this->store, 'md'.hash('sha256', 'http://localhost/'), serialize($tmp));
|
||||||
|
|
||||||
$this->request('GET', '/');
|
$this->request('GET', '/');
|
||||||
$this->assertHttpKernelIsCalled();
|
$this->assertHttpKernelIsCalled();
|
||||||
@ -659,12 +658,11 @@ class HttpCacheTest extends HttpCacheTestCase
|
|||||||
$values = $this->getMetaStorageValues();
|
$values = $this->getMetaStorageValues();
|
||||||
$this->assertCount(1, $values);
|
$this->assertCount(1, $values);
|
||||||
$tmp = unserialize($values[0]);
|
$tmp = unserialize($values[0]);
|
||||||
$time = \DateTime::createFromFormat('U', time());
|
|
||||||
$tmp[0][1]['date'] = \DateTime::createFromFormat('U', time() - 5)->format(DATE_RFC2822);
|
$tmp[0][1]['date'] = \DateTime::createFromFormat('U', time() - 5)->format(DATE_RFC2822);
|
||||||
$r = new \ReflectionObject($this->store);
|
$r = new \ReflectionObject($this->store);
|
||||||
$m = $r->getMethod('save');
|
$m = $r->getMethod('save');
|
||||||
$m->setAccessible(true);
|
$m->setAccessible(true);
|
||||||
$m->invoke($this->store, 'md'.sha1('http://localhost/'), serialize($tmp));
|
$m->invoke($this->store, 'md'.hash('sha256', 'http://localhost/'), serialize($tmp));
|
||||||
|
|
||||||
$this->request('GET', '/');
|
$this->request('GET', '/');
|
||||||
$this->assertHttpKernelIsCalled();
|
$this->assertHttpKernelIsCalled();
|
||||||
|
Reference in New Issue
Block a user