← Home

PHPUnit 7 testsuit upgrade

As of PHPUnit 6 have made breaking changes, we should update our testsuit to conform the following

// PHPUnit 6 introduced a breaking change that
// removed PHPUnit_Framework_TestCase as a base class,
// and replaced it with \PHPUnit\Framework\TestCase

It should be known that PHPUnit 7 has the extension as dependency

  • php-mbstring
[code lang="java"] 
class MethodNotAllowedExceptionTest extends PHPUnit_Framework_TestCase { 

should be replaced for

[code lang="java"] 
use PHPUnit\Framework\TestCase; 

class MethodNotAllowedExceptionTest extends TestCase { 
} [/code]