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 some unit tests #415

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Conversation

GuySartorelli
Copy link
Collaborator

Fixes some unit tests. Comments will explain why the changes were needed.

Issue

$this->orignalReadingMode = Versioned::get_reading_mode();
$this->originalReadingMode = Versioned::get_reading_mode();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See line 31 above - this was a typo which resulted in a PHP deprecation warning in CI. Super minor, doesn't really matter until they actually remove the ability to have dynamic properties and it's only a unit test so I don't think it's worth backporting.

Comment on lines -8 to -9
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\Forms\TextField;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither of these are used

$this->assertInstanceOf(DBHTMLText::class, $column);
$this->assertMatchesRegularExpression(
'/<input type="text" name="TestGridField\[GridFieldEditableColumns\]\[100\]\[Title\]" value="foo"[^>]*>/',
$column->getValue()
$column
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value for the column comes from forTemplate() which is now typed as string.

@emteknetnz emteknetnz merged commit 4bbfa9d into symbiote:5 Aug 27, 2024
9 checks passed
@emteknetnz emteknetnz deleted the pulls/5/fix-test branch August 27, 2024 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants