You are here

public function GinLbExtensionTest::testGinClasses in Gin Layout Builder 1.0.x

@covers ::calculateDependencies

File

tests/Unit/TwigExtension/GinLbExtensionTest.php, line 18

Class

GinLbExtensionTest
@coversDefaultClass \Drupal\gin_lb\TwigExtension\GinLbExtension @group gin_lb

Namespace

Drupal\Tests\gin_lb\Unit\TwigExtension

Code

public function testGinClasses() {
  $attributes = new Attribute();
  $attributes
    ->addClass('form-item');
  $attributes
    ->addClass('form-item-2');
  $attributes
    ->addClass('js-form-item');
  $cleaned_attributes = GinLbExtension::ginClasses($attributes);
  $this
    ->assertSame('class="glb-form-item glb-form-item-2 js-form-item"', $cleaned_attributes
    ->getClass()
    ->render());
}