public function RowTest::testSourceFreeze in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/migrate/tests/src/Unit/RowTest.php \Drupal\Tests\migrate\Unit\RowTest::testSourceFreeze()
Tests source immutability after freeze.
@expectedException \Exception
File
- core/
modules/ migrate/ tests/ src/ Unit/ RowTest.php, line 96 - Contains \Drupal\Tests\migrate\Unit\RowTest.
Class
- RowTest
- @coversDefaultClass \Drupal\migrate\Row @group migrate
Namespace
Drupal\Tests\migrate\UnitCode
public function testSourceFreeze() {
$row = new Row($this->testValues, $this->testSourceIds);
$row
->rehash();
$this
->assertSame($this->testHash, $row
->getHash(), 'Correct hash.');
$row
->setSourceProperty('title', 'new title');
$row
->rehash();
$this
->assertSame($this->testHashMod, $row
->getHash(), 'Hash changed correctly.');
$row
->freezeSource();
$row
->setSourceProperty('title', 'new title');
}