You are here

public function CurrencyWebTest::testHandler in Currency 8.3

Same name in this branch
  1. 8.3 tests/src/Functional/Plugin/views/filter/CurrencyWebTest.php \Drupal\Tests\currency\Functional\Plugin\views\filter\CurrencyWebTest::testHandler()
  2. 8.3 tests/src/Functional/Plugin/views/field/CurrencyWebTest.php \Drupal\Tests\currency\Functional\Plugin\views\field\CurrencyWebTest::testHandler()

Tests the handler.

File

tests/src/Functional/Plugin/views/field/CurrencyWebTest.php, line 35

Class

CurrencyWebTest
\Drupal\currency\Plugin\views\field\Currency web test.

Namespace

Drupal\Tests\currency\Functional\Plugin\views\field

Code

public function testHandler() {

  /** @var \Drupal\views\Entity\View $view */
  $view = View::load('currency_test');
  $view
    ->getExecutable()
    ->execute('default');
  $this
    ->assertEqual($view
    ->get('executable')->field['currency_sign']
    ->advancedRender($view
    ->get('executable')->result[0]), '€');
  $this
    ->assertEqual($view
    ->get('executable')->field['currency_subunits']
    ->advancedRender($view
    ->get('executable')->result[0]), '100');
}