remove legacy pdf path
This commit is contained in:
parent
28f4114def
commit
b280475314
6 changed files with 2 additions and 65 deletions
|
|
@ -191,7 +191,7 @@ class GetElementTest extends TestCase
|
|||
string $description,
|
||||
?string $iconImageUrl,
|
||||
string $richText,
|
||||
?string $pdfPath,
|
||||
?string $shortPdfPath,
|
||||
?string $youtubeUrl,
|
||||
?Element $parentElement,
|
||||
): Element {
|
||||
|
|
@ -201,7 +201,7 @@ class GetElementTest extends TestCase
|
|||
description: $description,
|
||||
iconImageUrl: $iconImageUrl,
|
||||
richText: $richText,
|
||||
shortPdfPath: $pdfPath,
|
||||
shortPdfPath: $shortPdfPath,
|
||||
longPdfPath: null,
|
||||
youtubeUrl: $youtubeUrl,
|
||||
parentElement: $parentElement,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue