Skip to content

Questioning the use of static calls to assert* methods #20392

@JoolsMcFly

Description

@JoolsMcFly

Hi all.

Pretty much everywhere in doc pages involving tests, calls made to assert* methods are not static but use $this.
Any reason not to use self::assert*?

Example: https://symfony.com/doc/6.4/form/unit_testing.html
self::assertTrue($form->isSynchronized());

instead of
$this->assertTrue($form->isSynchronized());

?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    hasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions