Security update for permissions_by_term
[yaffs-website] / vendor / behat / mink-selenium2-driver / tests / Custom / WindowNameTest.php
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}/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 }