public function ItemTestBase::testFromArray in Feeds 8.3
@covers ::fromArray @covers ::get
File
- tests/
src/ Unit/ Feeds/ Item/ ItemTestBase.php, line 55
Class
- ItemTestBase
- Base class for item tests.
Namespace
Drupal\Tests\feeds\Unit\Feeds\ItemCode
public function testFromArray() {
$this
->assertSame($this->item, $this->item
->fromArray([
'Foo' => 'Bar',
'Baz' => 'Qux',
]));
$this
->assertSame('Bar', $this->item
->get('Foo'));
$this
->assertSame('Qux', $this->item
->get('Baz'));
$this
->assertNull($this->item
->get('Bar'));
$this
->assertNull($this->item
->get('Qux'));
}