public function CountryDefaultFormatterTest::testRender in Address 8
Tests the rendered output.
File
- tests/
src/ Kernel/ Formatter/ CountryDefaultFormatterTest.php, line 26
Class
- CountryDefaultFormatterTest
- Tests the address_country_default formatter.
Namespace
Drupal\Tests\address\Kernel\FormatterCode
public function testRender() {
$entity = EntityTest::create([]);
$entity->{$this->fieldName}->value = 'RS';
$this
->renderEntityFields($entity, $this->display);
$this
->assertRaw('Serbia');
$entity->{$this->fieldName}->value = 'UNKNOWN';
$this
->renderEntityFields($entity, $this->display);
$this
->assertRaw('UNKNOWN');
}