view vendor/behat/mink-selenium2-driver/tests/Custom/WindowNameTest.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 129ea1e6d783
children
line wrap: on
line source
<?php

namespace Behat\Mink\Tests\Driver\Custom;

use Behat\Mink\Tests\Driver\TestCase;

class WindowNameTest extends TestCase
{
    public function testWindowNames()
    {
        $session = $this->getSession();
        $session->start();

        $windowNames = $session->getWindowNames();
        $this->assertArrayHasKey(0, $windowNames);

        $windowName = $session->getWindowName();

        $this->assertInternalType('string', $windowName);
        $this->assertContains($windowName, $windowNames, 'The current window name is one of the available window names.');
    }
}