You are here

public function NodeElementTest::testHasClass in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/tests/Element/NodeElementTest.php \Behat\Mink\Tests\Element\NodeElementTest::testHasClass()

File

vendor/behat/mink/tests/Element/NodeElementTest.php, line 151

Class

NodeElementTest

Namespace

Behat\Mink\Tests\Element

Code

public function testHasClass() {
  $node = new NodeElement('input_tag', $this->session);
  $this->driver
    ->expects($this
    ->exactly(6))
    ->method('getAttribute')
    ->with('input_tag', 'class')
    ->will($this
    ->returnValue('
            class1  class2
            '));
  $this
    ->assertTrue($node
    ->hasClass('class1'), 'The "class1" was found');
  $this
    ->assertTrue($node
    ->hasClass('class2'), 'The "class2" was found');
  $this
    ->assertFalse($node
    ->hasClass('class3'), 'The "class3" was not found');
}