Mercurial > hg > isophonics-drupal-site
view vendor/behat/mink-selenium2-driver/tests/Custom/WindowNameTest.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 1fec387a4317 |
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()); } }