Skip to content

Commit

Permalink
Fix test variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude committed Mar 28, 2024
1 parent 6d07b11 commit 36da7b8
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions tests/NotModified/Attribute/ReplaceWithNotModifiedResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ final class ReplaceWithNotModifiedResponseTest extends TestCase
public function lastModifiedDescriptionsCannotBeEmpty()
{
$this->expectException(RuntimeException::class);
$annotation = new ReplaceWithNotModifiedResponse([]);
$annotation->determineLastModified(new Request());
$attribute = new ReplaceWithNotModifiedResponse([]);
$attribute->determineLastModified(new Request());
}

/**
Expand All @@ -40,8 +40,8 @@ public function lastModifiedDescriptionsCannotBeEmpty()
*/
public function stringAsSimpleLastModifiedDescription()
{
$annotation = new ReplaceWithNotModifiedResponse([MyLastModifedDeterminator::class]);
$annotation->determineLastModified(new Request());
$attribute = new ReplaceWithNotModifiedResponse([MyLastModifedDeterminator::class]);
$attribute->determineLastModified(new Request());
}

/**
Expand All @@ -56,10 +56,10 @@ public function serviceNameAsLastModifiedDescription()
->with('my.service')
->willReturn(new MyLastModifedDeterminator());

$annotation = new ReplaceWithNotModifiedResponse(['@my.service']);
$annotation->setContainer($container);
$attribute = new ReplaceWithNotModifiedResponse(['@my.service']);
$attribute->setContainer($container);

$annotation->determineLastModified(new Request());
$attribute->determineLastModified(new Request());
}

/**
Expand All @@ -69,8 +69,8 @@ public function serviceNameAsLastModifiedDescription()
*/
public function arrayAslastModifiedDeterminatorDescriptionWithConstructorArguments()
{
$annotation = new ReplaceWithNotModifiedResponse([[MyLastModifedDeterminator::class => new DateTime('2000-01-01')]]);
$annotation->determineLastModified(new Request());
$attribute = new ReplaceWithNotModifiedResponse([[MyLastModifedDeterminator::class => new DateTime('2000-01-01')]]);
$attribute->determineLastModified(new Request());
}

/**
Expand All @@ -79,8 +79,8 @@ public function arrayAslastModifiedDeterminatorDescriptionWithConstructorArgumen
public function lastModifiedDeterminatorsHaveToImplementInterface()
{
$this->expectException(RuntimeException::class);
$annotation = new ReplaceWithNotModifiedResponse([FakeLastModifiedDeterminatorWithoutInterface::class]);
$annotation->determineLastModified(new Request());
$attribute = new ReplaceWithNotModifiedResponse([FakeLastModifiedDeterminatorWithoutInterface::class]);
$attribute->determineLastModified(new Request());
}

/**
Expand All @@ -90,9 +90,9 @@ public function lastModifiedDeterminatorsHaveToImplementInterface()
*/
public function determineLastModifiedDeterminesLastModifiedOfOneDeterminator()
{
$annotation = new ReplaceWithNotModifiedResponse([MyLastModifedDeterminator::class]);
$attribute = new ReplaceWithNotModifiedResponse([MyLastModifedDeterminator::class]);

$lastModified = $annotation->determineLastModified(new Request());
$lastModified = $attribute->determineLastModified(new Request());

self::assertEquals(DateTime::createFromFormat('U', time()), $lastModified);
}
Expand All @@ -102,12 +102,12 @@ public function determineLastModifiedDeterminesLastModifiedOfOneDeterminator()
*/
public function determineLastModifiedDeterminesLastModifiedOfMultipleDeterminators()
{
$annotation = new ReplaceWithNotModifiedResponse([
$attribute = new ReplaceWithNotModifiedResponse([
[MyLastModifedDeterminator::class => new DateTime('2001-01-01')],
[MyLastModifedDeterminator::class => new DateTime('2003-01-01')],
[MyLastModifedDeterminator::class => new DateTime('2002-01-01')],
]);
$this->assertEquals(new DateTime('2003-01-01'), $annotation->determineLastModified(new Request()));
$this->assertEquals(new DateTime('2003-01-01'), $attribute->determineLastModified(new Request()));
}
}

Expand Down

0 comments on commit 36da7b8

Please sign in to comment.