You are here

public function ItemTestBase::testToArray in Feeds 8.3

@covers ::toArray @covers ::set

File

tests/src/Unit/Feeds/Item/ItemTestBase.php, line 40

Class

ItemTestBase
Base class for item tests.

Namespace

Drupal\Tests\feeds\Unit\Feeds\Item

Code

public function testToArray() {
  $this->item
    ->set('field', 'value');
  $this->item
    ->set('field2', 'value2');
  $expected = [
    'field' => 'value',
    'field2' => 'value2',
  ];
  $this
    ->assertEquals($expected, $this->item
    ->toArray());
}