diff --git a/tests/Schema/ComparatorTest.php b/tests/Schema/ComparatorTest.php index 379ba39a49c..9fd8285f0ea 100644 --- a/tests/Schema/ComparatorTest.php +++ b/tests/Schema/ComparatorTest.php @@ -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);