Mercurial > hg > isophonics-drupal-site
view vendor/behat/mink-selenium2-driver/tests/Custom/WindowNameTest.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | |
children | 129ea1e6d783 |
line wrap: on
line source
<?php namespace Behat\Mink\Tests\Driver\Custom; use Behat\Mink\Tests\Driver\TestCase; class WindowNameTest extends TestCase { const WINDOW_NAME_REGEXP = '/(?:[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}|^\d++$)/i'; public function testPatternGetWindowNames() { $session = $this->getSession(); $windowNames = $session->getWindowNames(); $this->assertArrayHasKey(0, $windowNames); foreach ($windowNames as $name) { $this->assertRegExp(self::WINDOW_NAME_REGEXP, $name); } } public function testGetWindowName() { $session = $this->getSession(); $this->assertRegExp(self::WINDOW_NAME_REGEXP, $session->getWindowName()); } }