diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php index 32be113..ff36c0f 100644 --- a/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php +++ b/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php @@ -62,12 +62,12 @@ public function testExistingFormat() { $select = $this->xpath('//select[@name="editor[editor]"]'); $select_is_disabled = $this->xpath('//select[@name="editor[editor]" and @disabled="disabled"]'); $options = $this->xpath('//select[@name="editor[editor]"]/option'); - $this->assertTrue(count($select) === 1, 'The Text Editor select exists.'); - $this->assertTrue(count($select_is_disabled) === 0, 'The Text Editor select is not disabled.'); - $this->assertTrue(count($options) === 2, 'The Text Editor select has two options.'); - $this->assertTrue($options[0]->getText() === 'None', 'Option 1 in the Text Editor select is "None".'); - $this->assertTrue($options[1]->getText() === 'CKEditor', 'Option 2 in the Text Editor select is "CKEditor".'); - $this->assertTrue($options[0]->getAttribute('selected') === 'selected', 'Option 1 ("None") is selected.'); + $this->assertSame(1, count($select), 'The Text Editor select exists.'); + $this->assertSame(0, count($select_is_disabled), 'The Text Editor select is not disabled.'); + $this->assertSame(2, count($options), 'The Text Editor select has two options.'); + $this->assertSame('None', $options[0]->getText(), 'Option 1 in the Text Editor select is "None".'); + $this->assertSame('CKEditor', $options[1]->getText(), 'Option 2 in the Text Editor select is "CKEditor".'); + $this->assertSame('selected', $options[0]->getAttribute('selected'), 'Option 1 ("None") is selected.'); // Select the "CKEditor" editor and click the "Save configuration" button. $edit = [ @@ -232,12 +232,12 @@ public function testNewFormat() { $select = $this->xpath('//select[@name="editor[editor]"]'); $select_is_disabled = $this->xpath('//select[@name="editor[editor]" and @disabled="disabled"]'); $options = $this->xpath('//select[@name="editor[editor]"]/option'); - $this->assertTrue(count($select) === 1, 'The Text Editor select exists.'); - $this->assertTrue(count($select_is_disabled) === 0, 'The Text Editor select is not disabled.'); - $this->assertTrue(count($options) === 2, 'The Text Editor select has two options.'); - $this->assertTrue($options[0]->getText() === 'None', 'Option 1 in the Text Editor select is "None".'); - $this->assertTrue($options[1]->getText() === 'CKEditor', 'Option 2 in the Text Editor select is "CKEditor".'); - $this->assertTrue($options[0]->getAttribute('selected') === 'selected', 'Option 1 ("None") is selected.'); + $this->assertSame(1, count($select), 'The Text Editor select exists.'); + $this->assertSame(0, count($select_is_disabled), 'The Text Editor select is not disabled.'); + $this->assertSame(2, count($options), 'The Text Editor select has two options.'); + $this->assertSame('None', $options[0]->getText(), 'Option 1 in the Text Editor select is "None".'); + $this->assertSame('CKEditor', $options[1]->getText(), 'Option 2 in the Text Editor select is "CKEditor".'); + $this->assertSame('selected', $options[0]->getAttribute('selected'), 'Option 1 ("None") is selected.'); // Name our fancy new text format, select the "CKEditor" editor and click // the "Configure" button.