You are here

public function MixItUpDefaultOptionsServiceTest::testDefaultOptionsFalse in MixItUp Views 8.2

Same name and namespace in other branches
  1. 8 tests/src/Unit/MixItUpDefaultOptionsServiceTest.php \Drupal\Tests\mixitup_views\Unit\MixItUpDefaultOptionsServiceTest::testDefaultOptionsFalse()

Covers defaultOptions method if $convert param coming with a FALSE value.

@covers \Drupal\mixitup_views\MixitupViewsDefaultOptionsService::defaultOptions

File

tests/src/Unit/MixItUpDefaultOptionsServiceTest.php, line 37

Class

MixItUpDefaultOptionsServiceTest
Class MixItUpDefaultOptionsServiceTest.

Namespace

Drupal\Tests\mixitup_views\Unit

Code

public function testDefaultOptionsFalse() : void {
  $options = [
    'selectors' => [
      'target' => '.mix',
      'filter' => '.filter',
      'sort' => '.sort',
    ],
    'load' => [
      'filter' => 'all',
      'sort' => 'default:asc',
    ],
    'animation' => [
      'enable' => TRUE,
      'effects' => 'fade scale',
      'duration' => 600,
      'easing' => 'ease',
      'perspectiveDistance' => '3000px',
      'perspectiveOrigin' => '50% 50%',
      'queue' => TRUE,
      'queueLimit' => 1,
    ],
    'restrict' => [
      'vocab' => FALSE,
      'vocab_ids' => [],
    ],
  ];
  $this
    ->assertEquals($options, $this->unit
    ->defaultOptions(NULL));
}