You are here

public function ClassyParagraphsTestClassCase::testClassyParagraphsCheckMarkupOfMultipleClasses in Classy paragraphs 7

Check markup of multiple class.

File

tests/classy_paragraphs.test, line 134
Contains tests for Classy Paragraphs.

Class

ClassyParagraphsTestClassCase
Class ClassyParagraphsTestCase

Code

public function testClassyParagraphsCheckMarkupOfMultipleClasses() {
  $css_classes = array(
    'test-soft-value',
    'test-hard-value',
  );
  list($node, $entity) = $this
    ->createNodeWithParagraph($css_classes);
  $this
    ->drupalGet('node/' . $node->nid);
  foreach ($css_classes as $css_class) {
    $class = $this
      ->xpath('//*[contains(@class, "' . $css_class . '")]');
    $this
      ->assertTrue(count($class) == 1, $css_class . ' class found.');
  }
}