The baseUrl I set in the static $browsers variable does not have any effect. Take this example:
<?php
namespace AppBundle\Tests\Controller;
use aik099\PHPUnit\BrowserTestCase;
class WhateverControllerTest extends BrowserTestCase
{
public static $browsers = [
[
'driver' => 'selenium2',
'baseUrl' => 'http://www.google.com',
'port' => 8643
]
];
public function testAbc()
{
$this->getSession()->visit('/');
die($this->getSession()->getPage()->getContent());
}
}
?>
This gives me an output like this:
<html><head></head><body></body></html>
However, if I change the argument I pass to visit() to something like http://www.google.com instead, everything works as expected.
The baseUrl I set in the static
$browsersvariable does not have any effect. Take this example:This gives me an output like this:
However, if I change the argument I pass to
visit()to something likehttp://www.google.cominstead, everything works as expected.