Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run all methods including setUp, __constructor, ... #459

Open
ondrejkrajcik-blogic opened this issue May 1, 2024 · 0 comments
Open

Run all methods including setUp, __constructor, ... #459

ondrejkrajcik-blogic opened this issue May 1, 2024 · 0 comments

Comments

@ondrejkrajcik-blogic
Copy link

Hi,

I create first test

When I run my test phpunit run all methods including setUp, __constructor and others

When I downgrade phpunit/phpunit from 9.6.8 to 9.3.11 then only methods with prefix "tests" are started.

Is there some incompatibility?

<?php

use PHPUnit\Extensions\Selenium2TestCase;

require_once __DIR__ . '/../bootstrap.php';

class ExampleTest extends Selenium2TestCase
{
    public $browser = 'firefox';

    protected function setUp(): void
    {
        $this->setBrowser($this->browser);
        $this->setBrowserUrl('http://jmather.com/');
    }

    public function testTitle()
    {
        $this->url('/');
        $title = "It's Majax";
        $this->assertEquals($title, $this->title());
    }

    public function testSomeNavigation()
    {
        $this->url('/');
        $this->byXPath('//section[@class="widget widget_categories"]//a[text() = "PHP"]')->click();
        $title = "PHP | It's Majax";
        $this->assertEquals($title, $this->title());
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant