remove legacy pdf path

This commit is contained in:
Yisroel Baum 2026-06-20 22:50:10 +03:00
parent 28f4114def
commit b280475314
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
6 changed files with 2 additions and 65 deletions

View file

@ -83,7 +83,6 @@ class UpdateElementTest extends TestCase
richText: '<p>Updated rich text</p>',
shortPdfPath: '/assets/pdfs/updated.pdf',
longPdfPath: '/assets/pdfs/updated-long.pdf',
pdfPath: null,
youtubeUrl: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
fileType: null,
fileContents: null,
@ -125,42 +124,6 @@ class UpdateElementTest extends TestCase
$this->assertSame('Updated title', $persistedElement->getTitle());
}
public function testLegacyPdfPathIsNotAnUpdateField(): void
{
$set = $this->createSet(1, 'Baderech');
$element = $this->createElement(
$set,
'Original title',
'Original description',
null,
'<p>Original rich text</p>',
'/assets/pdfs/original.pdf',
'/assets/pdfs/original-long.pdf',
null,
null,
);
$this->expectException(BadRequestException::class);
$this->expectExceptionMessage('nothing to update');
$this->updateElement->execute(new UpdateElementRequest(
id: $element->getId(),
title: null,
description: null,
iconImageUrl: null,
richText: null,
shortPdfPath: null,
longPdfPath: null,
pdfPath: '/assets/pdfs/legacy-updated.pdf',
youtubeUrl: null,
fileType: null,
fileContents: null,
fileOriginalName: null,
fileMimeType: null,
fileSizeBytes: null,
));
}
public function testConvertsEmptyNullableFieldsToNull(): void
{
$set = $this->createSet(1, 'Baderech');
@ -185,7 +148,6 @@ class UpdateElementTest extends TestCase
richText: '<p>Updated rich text</p>',
shortPdfPath: '',
longPdfPath: '',
pdfPath: null,
youtubeUrl: '',
fileType: null,
fileContents: null,
@ -225,7 +187,6 @@ class UpdateElementTest extends TestCase
richText: null,
shortPdfPath: null,
longPdfPath: null,
pdfPath: null,
youtubeUrl: null,
fileType: null,
fileContents: null,
@ -285,7 +246,6 @@ class UpdateElementTest extends TestCase
richText: null,
shortPdfPath: null,
longPdfPath: null,
pdfPath: null,
youtubeUrl: null,
fileType: 'iconImage',
fileContents: 'binary-image-bytes',
@ -301,7 +261,6 @@ class UpdateElementTest extends TestCase
richText: null,
shortPdfPath: null,
longPdfPath: null,
pdfPath: null,
youtubeUrl: null,
fileType: 'shortPdf',
fileContents: 'binary-short-pdf-bytes',
@ -318,7 +277,6 @@ class UpdateElementTest extends TestCase
richText: null,
shortPdfPath: null,
longPdfPath: null,
pdfPath: null,
youtubeUrl: null,
fileType: 'longPdf',
fileContents: 'binary-long-pdf-bytes',
@ -367,7 +325,6 @@ class UpdateElementTest extends TestCase
richText: null,
shortPdfPath: null,
longPdfPath: null,
pdfPath: null,
youtubeUrl: null,
fileType: null,
fileContents: 'binary-image-bytes',
@ -390,7 +347,6 @@ class UpdateElementTest extends TestCase
richText: null,
shortPdfPath: null,
longPdfPath: null,
pdfPath: null,
youtubeUrl: null,
fileType: 'audio',
fileContents: 'binary-audio-bytes',
@ -413,7 +369,6 @@ class UpdateElementTest extends TestCase
richText: '<p>Updated rich text</p>',
shortPdfPath: null,
longPdfPath: null,
pdfPath: null,
youtubeUrl: null,
fileType: null,
fileContents: null,
@ -436,7 +391,6 @@ class UpdateElementTest extends TestCase
richText: null,
shortPdfPath: null,
longPdfPath: null,
pdfPath: null,
youtubeUrl: null,
fileType: null,
fileContents: null,
@ -459,7 +413,6 @@ class UpdateElementTest extends TestCase
richText: '<p>Updated rich text</p>',
shortPdfPath: null,
longPdfPath: null,
pdfPath: null,
youtubeUrl: null,
fileType: null,
fileContents: null,
@ -482,7 +435,6 @@ class UpdateElementTest extends TestCase
richText: '<p>Updated rich text</p>',
shortPdfPath: null,
longPdfPath: null,
pdfPath: null,
youtubeUrl: null,
fileType: null,
fileContents: null,