diff --git a/tests/Schema/ComparatorTest.php b/tests/Schema/ComparatorTest.php index 7d88c388d49..8e17c8395f0 100644 --- a/tests/Schema/ComparatorTest.php +++ b/tests/Schema/ComparatorTest.php @@ -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;