Mercurial > hg > isophonics-drupal-site
diff vendor/behat/mink-selenium2-driver/tests/Custom/WindowNameTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
line wrap: on
line diff
--- a/vendor/behat/mink-selenium2-driver/tests/Custom/WindowNameTest.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/behat/mink-selenium2-driver/tests/Custom/WindowNameTest.php Thu Feb 28 13:21:36 2019 +0000 @@ -6,24 +6,17 @@ 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() + public function testWindowNames() { $session = $this->getSession(); + $session->start(); $windowNames = $session->getWindowNames(); $this->assertArrayHasKey(0, $windowNames); - foreach ($windowNames as $name) { - $this->assertRegExp(self::WINDOW_NAME_REGEXP, $name); - } - } + $windowName = $session->getWindowName(); - public function testGetWindowName() - { - $session = $this->getSession(); - - $this->assertRegExp(self::WINDOW_NAME_REGEXP, $session->getWindowName()); + $this->assertInternalType('string', $windowName); + $this->assertContains($windowName, $windowNames, 'The current window name is one of the available window names.'); } }