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 14, 2023
1 parent b1076ed commit 9be3e34
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 @@ -1137,28 +1137,8 @@ public function testComplexDiffColumn(): void

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

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

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

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

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

$expected = new SchemaDiff();
$expected->fromSchema = $fromSchema;
Expand Down

0 comments on commit 9be3e34

Please sign in to comment.