Skip to content

Commit

Permalink
Get rid of the usage of InvocationMocker::withConsecutive()
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Jun 13, 2023
1 parent b946fc8 commit 349039d
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions tests/Schema/ComparatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -622,28 +622,8 @@ public function testAutoIncrementNoSequences(): void

public function testComparesNamespaces(): void
{
$oldSchema = $this->getMockBuilder(Schema::class)
->onlyMethods(['getNamespaces', 'hasNamespace'])
->getMock();
$newSchema = $this->getMockBuilder(Schema::class)
->onlyMethods(['getNamespaces', 'hasNamespace'])
->getMock();

$oldSchema->expects(self::once())
->method('getNamespaces')
->willReturn(['foo', 'bar']);

$oldSchema->method('hasNamespace')
->withConsecutive(['bar'], ['baz'])
->willReturnOnConsecutiveCalls(true, false);

$newSchema->expects(self::once())
->method('getNamespaces')
->willReturn(['bar', 'baz']);

$newSchema->method('hasNamespace')
->withConsecutive(['foo'], ['bar'])
->willReturnOnConsecutiveCalls(false, true);
$oldSchema = new Schema([], [], null, ['foo', 'bar']);
$newSchema = new Schema([], [], null, ['bar', 'baz']);

$diff = $this->comparator->compareSchemas($oldSchema, $newSchema);

Expand Down

0 comments on commit 349039d

Please sign in to comment.