Skip to content

Commit 7d76227

Browse files
committed
removed usage of $that
1 parent 6647406 commit 7d76227

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@ public function testCacheIsFreshAfterCacheClearedWithWarmup()
5757
// simply check that cache is warmed up
5858
$this->assertGreaterThanOrEqual(1, count($metaFiles));
5959
$configCacheFactory = new ConfigCacheFactory(true);
60-
$that = $this;
6160

6261
foreach ($metaFiles as $file) {
63-
$configCacheFactory->cache(substr($file, 0, -5), function () use ($that, $file) {
64-
$that->fail(sprintf('Meta file "%s" is not fresh', (string) $file));
62+
$configCacheFactory->cache(substr($file, 0, -5), function () use ($file) {
63+
$this->fail(sprintf('Meta file "%s" is not fresh', (string) $file));
6564
});
6665
}
6766

src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -871,10 +871,8 @@ public function testServesResponseWhileFreshAndRevalidatesWithLastModifiedInform
871871

872872
sleep(15); // expire the cache
873873

874-
$that = $this;
875-
876-
$this->setNextResponse(304, array(), '', function (Request $request, Response $response) use ($time, $that) {
877-
$that->assertEquals($time->format(DATE_RFC2822), $request->headers->get('IF_MODIFIED_SINCE'));
874+
$this->setNextResponse(304, array(), '', function (Request $request, Response $response) use ($time) {
875+
$this->assertEquals($time->format(DATE_RFC2822), $request->headers->get('IF_MODIFIED_SINCE'));
878876
});
879877

880878
$this->request('GET', '/');

0 commit comments

Comments
 (0)