-
Notifications
You must be signed in to change notification settings - Fork 125
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
Conversation
$this->orignalReadingMode = Versioned::get_reading_mode(); | ||
$this->originalReadingMode = Versioned::get_reading_mode(); |
There was a problem hiding this comment.
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.
use SilverStripe\ORM\FieldType\DBHTMLText; | ||
use SilverStripe\Forms\TextField; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
.
Fixes some unit tests. Comments will explain why the changes were needed.
Issue