Skip to content

Commit

Permalink
Fix: Use mock builder to build mocks of abstract classes
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz authored and sebastianbergmann committed Oct 25, 2017
1 parent c5a94f6 commit 5c34f3c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/Framework/Constraint/LogicalAndTest.php
Expand Up @@ -21,7 +21,7 @@ public function testFromConstraintsReturnsConstraint()
$count = 5;

$constraints = \array_map(function () use ($other) {
$constraint = $this->createMock(Constraint::class);
$constraint = $this->getMockBuilder(Constraint::class)->getMock();

$constraint
->expects($this->once())
Expand Down
2 changes: 1 addition & 1 deletion tests/Framework/Constraint/LogicalOrTest.php
Expand Up @@ -21,7 +21,7 @@ public function testFromConstraintsReturnsConstraint()
$count = 5;

$constraints = \array_map(function () use ($other) {
$constraint = $this->createMock(Constraint::class);
$constraint = $this->getMockBuilder(Constraint::class)->getMock();

$constraint
->expects($this->once())
Expand Down
2 changes: 1 addition & 1 deletion tests/Framework/Constraint/LogicalXorTest.php
Expand Up @@ -23,7 +23,7 @@ public function testFromConstraintsReturnsConstraint()
$constraints = \array_map(function () use ($other) {
static $count = 0;

$constraint = $this->createMock(Constraint::class);
$constraint = $this->getMockBuilder(Constraint::class)->getMock();

$constraint
->expects($this->once())
Expand Down

0 comments on commit 5c34f3c

Please sign in to comment.