I've got some really strange behaviour after upgrading my project to phpunit-selenium 9.0.0 (phpunit 9.5.8, php 8.0) from phpunit-selenium 8.0.0 (phpunit 8.5.8, php 7.4). I have a very simple test case:
class ChromeTest extends SeleniumTestCase
{
protected function setUp(): void
{
$this->setBrowser('chrome');
$this->setBrowserUrl('http://localhost');
}
/** @test */
public function visit_index_page()
{
$this->visit('/')
->assertTitle('my project title');
}
}
Worked just fine with version 8.0.0, one test passes. With version 9.0.0, all of a sudden, there are three hundred functions that get executed as "tests". I don't know where these functions are even located. I didn't change anything in the source code. Every single one of the failed tests say This test did not perform any assertions.
Really don't know what to do here. Since this is a now PHP 8 project I can't go back to phpunit-selenium 8.0.0 again as it only supports PHP 7. Please let me know if you need any more information. Thanks!
EDIT: Minimal example to reproduce:
File test/Test.php
<?php
class Test extends \PHPUnit\Extensions\Selenium2TestCase
{
protected function setUp(): void
{
$this->setBrowser('chrome');
$this->setBrowserUrl('http://localhost');
}
/** @test */
public function test()
{
$this->assertTrue(true);
}
}
I've got some really strange behaviour after upgrading my project to phpunit-selenium 9.0.0 (phpunit 9.5.8, php 8.0) from phpunit-selenium 8.0.0 (phpunit 8.5.8, php 7.4). I have a very simple test case:
Worked just fine with version 8.0.0, one test passes. With version 9.0.0, all of a sudden, there are three hundred functions that get executed as "tests". I don't know where these functions are even located. I didn't change anything in the source code. Every single one of the failed tests say
This test did not perform any assertions
.Really don't know what to do here. Since this is a now PHP 8 project I can't go back to phpunit-selenium 8.0.0 again as it only supports PHP 7. Please let me know if you need any more information. Thanks!
EDIT: Minimal example to reproduce: File
test/Test.php
FIle
./composer.json
Install dependencies, run tests in
ChromeTest.php
.