Skip to content
Snippets Groups Projects
Commit c9e602b2 authored by Tim Rohaly's avatar Tim Rohaly Committed by Tim Rohaly
Browse files

Issue #3348343 by TR: Replace assert* involving count() and an equality operator with assertCount()

parent d0a258ed
No related branches found
No related tags found
1 merge request!13Resolve #3456818 "Remove outdated versioncompare"
......@@ -81,7 +81,7 @@ class TextareaWidgetTest extends FormWidgetBrowserTestBase {
->setDescription('Enter text, minimum 40 characters.');
// Omitting the 'allowEmptyString' argument in Symfony 4+ (which is used in
// Drupal 9.0+) gives a deprecation warning, but this option does not exist
// in in Symfony 6 (which is used in Drupal 10).
// in Symfony 6 (which is used in Drupal 10).
// @see https://www.drupal.org/project/typed_data/issues/3266222
if (version_compare(\Drupal::VERSION, '10.0', '>=')) {
$context_definition->addConstraint('Length', ['min' => 40]);
......
......@@ -37,11 +37,11 @@ class TextDataTypeTest extends KernelTestBase {
// Check basic get and set functionality.
$this->assertSame($value, $typed_data->getValue(), 'Text value was fetched.');
$this->assertEquals(0, $typed_data->validate()->count());
$this->assertCount(0, $typed_data->validate());
$new_value = $this->randomString() . "\r\n" . $this->randomString();
$typed_data->setValue($new_value);
$this->assertSame($new_value, $typed_data->getValue(), 'Text value was changed.');
$this->assertEquals(0, $typed_data->validate()->count());
$this->assertCount(0, $typed_data->validate());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment