Skip to content

Rework the tests #250

@oliverklee

Description

@oliverklee

I'd like to rework the tests like this (in multiple steps):

  • Move the tests to a separate PHP namespace #252 change the topmost test namespace from Sabberworm\CSS to Sabberworm\CSS\Tests so that tests have their own namespace (so that one namespace does not map to two different directories)
  • Move the tests to a separate PHP namespace #252 add PSR-4 dev-autoloading for the tests
  • change $this->assert* to self::assert* (as the assert methods are static, and think that it's cleaner to call static methods statically)
  • change the test names from using the test prefix (e.g., testStringQuotingType) to use the @test annotation so that the tests names are shorter and can later be reworded to be statements like emptyStringDoesNotProduceAnyRules (as a made-up example)
  • reword the test names to be sentences describing the tested behavior
  • split up some test methods so that each test (in the optimal case) tests exact one piece of behavior (which makes the tests easier to understand, and which also helps debug the cause of a problem if a test fails)

@sabberworm @westonruter Would these changes be okay for you?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions