X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fmigrate%2Ftests%2Fsrc%2FUnit%2Fprocess%2FIteratorTest.php;h=f2124a6db3693919505cd0306839a27400eb8693;hb=4f1b9b4ab48a8498afac9e2213a02a23ccf4a06c;hp=46daadefc3568e2f9c1d6eb01c8d81c7a016ab84;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/web/core/modules/migrate/tests/src/Unit/process/IteratorTest.php b/web/core/modules/migrate/tests/src/Unit/process/IteratorTest.php index 46daadefc..f2124a6db 100644 --- a/web/core/modules/migrate/tests/src/Unit/process/IteratorTest.php +++ b/web/core/modules/migrate/tests/src/Unit/process/IteratorTest.php @@ -18,7 +18,7 @@ class IteratorTest extends MigrateTestCase { /** * The iterator plugin being tested. * - * @var \Drupal\migrate\Plugin\migrate\process\TestIterator + * @var \Drupal\migrate\Plugin\migrate\process\Iterator */ protected $plugin; @@ -33,6 +33,7 @@ class IteratorTest extends MigrateTestCase { * Tests the iterator process plugin. * * @group legacy + * @expectedDeprecation The Drupal\migrate\Plugin\migrate\process\Iterator is deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.0. Instead, use Drupal\migrate\Plugin\migrate\process\SubProcess */ public function testIterator() { $migration = $this->getMigration(); @@ -75,10 +76,10 @@ class IteratorTest extends MigrateTestCase { // values ended up in the proper destinations, and that the value of the // key (@id) is the same as the destination ID (42). $new_value = $plugin->transform($current_value, $migrate_executable, $row, 'test'); - $this->assertSame(count($new_value), 1); - $this->assertSame(count($new_value[42]), 2); - $this->assertSame($new_value[42]['foo'], 'test'); - $this->assertSame($new_value[42]['id'], 42); + $this->assertSame(1, count($new_value)); + $this->assertSame(2, count($new_value[42])); + $this->assertSame('test', $new_value[42]['foo']); + $this->assertSame(42, $new_value[42]['id']); } }