function RowTest::testGetSourceProperty

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/RowTest.php \Drupal\Tests\migrate\Unit\RowTest::testGetSourceProperty()
  2. 8.9.x core/modules/migrate/tests/src/Unit/RowTest.php \Drupal\Tests\migrate\Unit\RowTest::testGetSourceProperty()
  3. 10 core/modules/migrate/tests/src/Unit/RowTest.php \Drupal\Tests\migrate\Unit\RowTest::testGetSourceProperty()

Tests getting the source property.

@covers ::getSourceProperty

File

core/modules/migrate/tests/src/Unit/RowTest.php, line 273

Class

RowTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21migrate%21src%21Row.php/class/Row/11.x" title="Stores a row." class="local">\Drupal\migrate\Row</a> @group migrate

Namespace

Drupal\Tests\migrate\Unit

Code

public function testGetSourceProperty() : void {
    $row = new Row($this->testValues, $this->testSourceIds);
    $this->assertSame($this->testValues['nid'], $row->getSourceProperty('nid'));
    $this->assertSame($this->testValues['title'], $row->getSourceProperty('title'));
    $this->assertNull($row->getSourceProperty('non_existing'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.