comparison 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
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
1 <?php
2
3 namespace Behat\Mink\Tests\Driver\Custom;
4
5 use Behat\Mink\Tests\Driver\TestCase;
6
7 class WindowNameTest extends TestCase
8 {
9 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';
10
11 public function testPatternGetWindowNames()
12 {
13 $session = $this->getSession();
14
15 $windowNames = $session->getWindowNames();
16 $this->assertArrayHasKey(0, $windowNames);
17
18 foreach ($windowNames as $name) {
19 $this->assertRegExp(self::WINDOW_NAME_REGEXP, $name);
20 }
21 }
22
23 public function testGetWindowName()
24 {
25 $session = $this->getSession();
26
27 $this->assertRegExp(self::WINDOW_NAME_REGEXP, $session->getWindowName());
28 }
29 }