function CurrencyTest::testRenderWithNonExistingCurrency in Currency 8.3
@covers ::render
File
- tests/
src/ Unit/ Plugin/ views/ field/ CurrencyTest.php, line 152
Class
- CurrencyTest
- @coversDefaultClass \Drupal\currency\Plugin\views\field\Currency
Namespace
Drupal\Tests\currency\Unit\Plugin\views\fieldCode
function testRenderWithNonExistingCurrency() {
$currency_code = $this
->randomMachineName();
$field_alias = $this
->randomMachineName();
$this->sut->field_alias = $field_alias;
$result_row = new ResultRow([
$field_alias => $currency_code,
]);
$this->currencyStorage
->expects($this
->atLeastOnce())
->method('load')
->with($currency_code)
->willReturn(NULL);
$this
->assertInstanceOf(MarkupInterface::class, $this->sut
->render($result_row));
}