Commit bcec845d authored by catch's avatar catch
Browse files

Issue #3128575 by longwave, jungle, daffie: Replace assert*(*, is_null()) with...

Issue #3128575 by longwave, jungle, daffie: Replace assert*(*, is_null()) with assertNotNull()/assertNull()
parent 4fe0b034
......@@ -31,7 +31,7 @@ protected function setUp(): void {
public function testWidgetSettings() {
// Test the config can be loaded.
$form_display = EntityFormDisplay::load('node.story.default');
$this->assertIdentical(FALSE, is_null($form_display), "Form display node.story.default loaded with config.");
$this->assertNotNull($form_display);
// Text field.
$component = $form_display->getComponent('field_test');
......
......@@ -80,7 +80,7 @@ protected function assertComponent($display_id, $component_id, $type, $label, $w
*/
protected function assertComponentNotExists($display_id, $component_id) {
$component = EntityViewDisplay::load($display_id)->getComponent($component_id);
$this->assertTrue(is_null($component));
$this->assertNull($component);
}
/**
......
......@@ -42,7 +42,7 @@ public function testUploadEntityDisplay() {
// Assure this doesn't exist.
$display = EntityViewDisplay::load('node.article.default');
$component = $display->getComponent('upload');
$this->assertTrue(is_null($component));
$this->assertNull($component);
$this->assertIdentical([['node', 'page', 'default', 'upload']], $this->getMigration('d6_upload_entity_display')->getIdMap()->lookupDestinationIds(['page']));
}
......
......@@ -42,7 +42,7 @@ public function testUploadEntityFormDisplay() {
// Assure this doesn't exist.
$display = EntityFormDisplay::load('node.article.default');
$component = $display->getComponent('upload');
$this->assertTrue(is_null($component));
$this->assertNull($component);
$this->assertIdentical([['node', 'page', 'default', 'upload']], $this->getMigration('d6_upload_entity_form_display')->getIdMap()->lookupDestinationIds(['page']));
}
......
......@@ -41,7 +41,7 @@ public function testUploadFieldInstance() {
// Shouldn't exist.
$field = FieldConfig::load('node.article.upload');
$this->assertTrue(is_null($field));
$this->assertNull($field);
$this->assertIdentical([['node', 'page', 'upload']], $this->getMigration('d6_upload_field_instance')->getIdMap()->lookupDestinationIds(['page']));
}
......
......@@ -79,7 +79,7 @@ public function testValidation($input, $exception) {
$this->expectExceptionMessage($exception->getMessage());
}
EntityCondition::createFromQueryParameter($input);
$this->assertTrue(is_null($exception), 'No exception was expected.');
$this->assertNull($exception, 'No exception was expected.');
}
/**
......
......@@ -26,7 +26,7 @@ protected function setUp(): void {
public function testViewModes() {
// Test a new view mode.
$view_mode = EntityViewMode::load('node.preview');
$this->assertIdentical(FALSE, is_null($view_mode), 'Preview view mode loaded.');
$this->assertNotNull($view_mode);
$this->assertIdentical('Preview', $view_mode->label(), 'View mode has correct label.');
// Test the ID map.
$this->assertIdentical([['node', 'preview']], $this->getMigration('d6_view_modes')->getIdMap()->lookupDestinationIds([1]));
......
......@@ -39,7 +39,7 @@ protected function setUp(): void {
*/
public function testUserProfileValues() {
$user = User::load(2);
$this->assertFalse(is_null($user));
$this->assertNotNull($user);
$this->assertIdentical('red', $user->profile_color->value);
$expected = <<<EOT
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nulla sapien, congue nec risus ut, adipiscing aliquet felis. Maecenas quis justo vel nulla varius euismod. Quisque metus metus, cursus sit amet sem non, bibendum vehicula elit. Cras dui nisl, eleifend at iaculis vitae, lacinia ut felis. Nullam aliquam ligula volutpat nulla consectetur accumsan. Maecenas tincidunt molestie diam, a accumsan enim fringilla sit amet. Morbi a tincidunt tellus. Donec imperdiet scelerisque porta. Sed quis sem bibendum eros congue sodales. Vivamus vel fermentum est, at rutrum orci. Nunc consectetur purus ut dolor pulvinar, ut volutpat felis congue. Cras tincidunt odio sed neque sollicitudin, vehicula tempor metus scelerisque.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment