''], ['text' => ['required', 'string']], migrations: [ 1 => fn (array $data): array => ['text' => $data['title']], 2 => fn (array $data): array => [...$data, 'format' => 'plain'], ], ); $persisted = ['title' => 'Original']; $result = $definition->migrate(1, $persisted); $this->assertSame(['version' => 3, 'data' => ['text' => 'Original', 'format' => 'plain']], $result); $this->assertSame(['title' => 'Original'], $persisted); } #[Test] public function missing_schema_migration_fails_loudly(): void { $definition = new BlockDefinition('example', 'basic', 'Example', 'square', 2, [], []); $this->expectException(LogicException::class); $definition->migrate(1, []); } }