Why don't PHP use a unit testing framework like PHPUnit? -
i stumbled upon bug found in php 5.5.11 substr_compare
isn't working given combination of function parameters. (bug)
i wondering how such basic functionality comparing strings can ever broken in released version of php. had official of php , took @ unit testing infrastructure.
the tests (example) had @
- quite hard read (as instructions test , assertions separated have manually count lines know assertions belong function calls) [sic]
- all of assertions based on string comparison (that's why of assertions wrapped inside
var_dump
) [sic]
so questions are:
- why don't php use testing framework phpunit? there plans migrate?
- are there stats test coverage 1 find lines of code not yet covered unit test?
php using phpt
testing.
using bigger phpunit include php logic tests. meaning bug in php phpunit let test pass fail otherwise. note php should tested phpunit written in php.
but however, run-tests.php
required run current tests uses ~2600 lines of php code. meaning bug in functions used there influence test results, amount of complexity still less phpunit.
i hope other questions answered comments of @markbaker. maybe link provides additional information: https://qa.php.net/write-test.php
remains say, php open source software , free improve test suite. in special case, substr_compare
bug, encourage that.
Comments
Post a Comment