Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Fix variant for image manipulation test #518

Merged

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Sep 28, 2022

Fixes https://github.com/silverstripe/silverstripe-assets/actions/runs/3139439033/jobs/5099856508

SilverStripe\Assets\Tests\ImageManipulationTest::testRender with data set "ImageManipulation" ('$Me.CropWidth(100)', '<img width="100" height="300"...zy" />')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'<img width="100" height="300" alt="This is a image Title" src="/assets/ImageTest/folder/test-image__CropWidthWyIxMDAiXQ.png" loading="lazy" />'
+'<img width="100" height="300" alt="This is a image Title" src="/assets/ImageTest/folder/test-image__CropWidthWzEwMF0.png" loading="lazy" />'

The old base64 encoded string "WyIxMDAiXQ" evaluates to ["100"], and the new one ("WzEwMF0") evaluates to [100]. This is a result of this PR in framework which allows primitive types to be passed directly to method arguments in templates. So where 100 had previously been interpreted as a string through the template logic, it's now a true int.

Parent issue

@emteknetnz emteknetnz merged commit fc5722e into silverstripe:2 Sep 29, 2022
@emteknetnz emteknetnz deleted the pulls/2/fix-variant-test branch September 29, 2022 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants