You are here

public function ContentTest::testGetAttribute in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/behat/mink/driver-testsuite/tests/Basic/ContentTest.php \Behat\Mink\Tests\Driver\Basic\ContentTest::testGetAttribute()

@dataProvider getAttributeDataProvider

File

vendor/behat/mink/driver-testsuite/tests/Basic/ContentTest.php, line 39

Class

ContentTest

Namespace

Behat\Mink\Tests\Driver\Basic

Code

public function testGetAttribute($attributeName, $attributeValue) {
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/index.html'));
  $element = $this
    ->getSession()
    ->getPage()
    ->findById('attr-elem[' . $attributeName . ']');
  $this
    ->assertNotNull($element);
  $this
    ->assertSame($attributeValue, $element
    ->getAttribute($attributeName));
}