Skip to content

Commit 97c5078

Browse files
author
Dominik Liebler
authored
Merge pull request DesignPatternsPHP#262 from mtdavidson/patch-1
Correct variable names in specification test
2 parents b43ed2c + 3904c94 commit 97c5078

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Behavioral/Specification/Tests/SpecificationTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ public function testCanAnd()
2727
$spec1 = new PriceSpecification(50, 100);
2828
$spec2 = new PriceSpecification(80, 200);
2929

30-
$orSpec = new AndSpecification($spec1, $spec2);
30+
$andSpec = new AndSpecification($spec1, $spec2);
3131

32-
$this->assertFalse($orSpec->isSatisfiedBy(new Item(150)));
33-
$this->assertFalse($orSpec->isSatisfiedBy(new Item(1)));
34-
$this->assertFalse($orSpec->isSatisfiedBy(new Item(51)));
35-
$this->assertTrue($orSpec->isSatisfiedBy(new Item(100)));
32+
$this->assertFalse($andSpec->isSatisfiedBy(new Item(150)));
33+
$this->assertFalse($andSpec->isSatisfiedBy(new Item(1)));
34+
$this->assertFalse($andSpec->isSatisfiedBy(new Item(51)));
35+
$this->assertTrue($andSpec->isSatisfiedBy(new Item(100)));
3636
}
3737

3838
public function testCanNot()
3939
{
4040
$spec1 = new PriceSpecification(50, 100);
41-
$orSpec = new NotSpecification($spec1);
41+
$notSpec = new NotSpecification($spec1);
4242

43-
$this->assertTrue($orSpec->isSatisfiedBy(new Item(150)));
44-
$this->assertFalse($orSpec->isSatisfiedBy(new Item(50)));
43+
$this->assertTrue($notSpec->isSatisfiedBy(new Item(150)));
44+
$this->assertFalse($notSpec->isSatisfiedBy(new Item(50)));
4545
}
4646
}

0 commit comments

Comments
 (0)