Skip to content

refactor: FormatRulesTest and StrictRules\FormatRulesTest#6670

Merged
kenjis merged 2 commits intocodeigniter4:developfrom
kenjis:refactor-FormatRulesTest
Oct 12, 2022
Merged

refactor: FormatRulesTest and StrictRules\FormatRulesTest#6670
kenjis merged 2 commits intocodeigniter4:developfrom
kenjis:refactor-FormatRulesTest

Conversation

@kenjis
Copy link
Copy Markdown
Member

@kenjis kenjis commented Oct 12, 2022

Description

  • use inheritance

Before:

$ ./phpunit tests/system/Validation/FormatRulesTest.php
PHPUnit 9.5.25 #StandWithUkraine

Runtime:       PHP 8.1.11
Configuration: /Users/kenji/work/codeigniter/official/CodeIgniter4/phpunit.xml

...............................................................  63 / 193 ( 32%)
............................................................... 126 / 193 ( 65%)
............................................................... 189 / 193 ( 97%)
....                                                            193 / 193 (100%)

Time: 00:00.888, Memory: 16.00 MB

OK (193 tests, 193 assertions)

$ ./phpunit tests/system/Validation/StrictRules/FormatRulesTest.php
PHPUnit 9.5.25 #StandWithUkraine

Runtime:       PHP 8.1.11
Configuration: /Users/kenji/work/codeigniter/official/CodeIgniter4/phpunit.xml

...............................................................  63 / 198 ( 31%)
............................................................... 126 / 198 ( 63%)
............................................................... 189 / 198 ( 95%)
.........                                                       198 / 198 (100%)

Time: 00:00.953, Memory: 16.00 MB

OK (198 tests, 198 assertions)

After:

$ ./phpunit tests/system/Validation/FormatRulesTest.php
PHPUnit 9.5.25 #StandWithUkraine

Runtime:       PHP 8.1.11
Configuration: /Users/kenji/work/codeigniter/official/CodeIgniter4/phpunit.xml

...............................................................  63 / 195 ( 32%)
............................................................... 126 / 195 ( 64%)
............................................................... 189 / 195 ( 96%)
......                                                          195 / 195 (100%)

Time: 00:01.352, Memory: 16.00 MB

OK (195 tests, 195 assertions)

$ ./phpunit tests/system/Validation/StrictRules/FormatRulesTest.php
PHPUnit 9.5.25 #StandWithUkraine

Runtime:       PHP 8.1.11
Configuration: /Users/kenji/work/codeigniter/official/CodeIgniter4/phpunit.xml

...............................................................  63 / 199 ( 31%)
............................................................... 126 / 199 ( 63%)
............................................................... 189 / 199 ( 94%)
..........                                                      199 / 199 (100%)

Time: 00:01.005, Memory: 16.00 MB

OK (199 tests, 199 assertions)

Checklist:

  • Securely signed commits
  • [] Component(s) with PHPDoc blocks, only if necessary or adds value
  • [] Unit testing, with >80% coverage
  • [] User guide updated
  • Conforms to style guide

@kenjis kenjis added the testing Pull requests that changes tests only label Oct 12, 2022
@kenjis kenjis merged commit 8255215 into codeigniter4:develop Oct 12, 2022
@kenjis kenjis deleted the refactor-FormatRulesTest branch October 12, 2022 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Pull requests that changes tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants