You are here

public function CartBlockTest::testCartIcon in Ubercart 8.4

Test show cart icon functionality.

File

uc_cart/tests/src/Functional/CartBlockTest.php, line 89

Class

CartBlockTest
Tests the cart block functionality.

Namespace

Drupal\Tests\uc_cart\Functional

Code

public function testCartIcon() {

  /** @var \Drupal\Tests\WebAssert $assert */
  $assert = $this
    ->assertSession();
  $this
    ->drupalGet('');
  $assert
    ->responseContains('cart-block-icon');
  $this->block
    ->getPlugin()
    ->setConfigurationValue('show_image', FALSE);
  $this->block
    ->save();
  $this
    ->drupalGet('');
  $assert
    ->responseNotContains('cart-block-icon');
}