Merge pull request #4913 from tobiasd/20180423-phpunit
phpunit compat 5.6 vs 7.x
This commit is contained in:
commit
2f024a3a6d
|
@ -7,12 +7,14 @@ namespace Friendica\Test;
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\BaseObject;
|
||||
use PHPUnit_Framework_TestCase;
|
||||
|
||||
// backward compatibility
|
||||
if (!class_exists('\PHPUnit\Framework\TestCase')) {
|
||||
class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
|
||||
}
|
||||
/**
|
||||
* Tests for the BaseObject class.
|
||||
*/
|
||||
class BaseObjectTest extends PHPUnit_Framework_TestCase
|
||||
class BaseObjectTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,12 +5,15 @@
|
|||
|
||||
namespace Friendica\Test;
|
||||
|
||||
use PHPUnit_Framework_TestCase;
|
||||
// backward compatibility
|
||||
if (!class_exists('\PHPUnit\Framework\TestCase')) {
|
||||
class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests for text functions.
|
||||
*/
|
||||
class TextTest extends PHPUnit_Framework_TestCase
|
||||
class TextTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
|
@ -61,10 +64,10 @@ class TextTest extends PHPUnit_Framework_TestCase
|
|||
public function testAutonameLength1()
|
||||
{
|
||||
$autoname1=autoname(1);
|
||||
$this->assertEquals(1, count($autoname1));
|
||||
$this->assertEquals(1, strlen($autoname1));
|
||||
|
||||
$autoname2=autoname(1);
|
||||
$this->assertEquals(1, count($autoname2));
|
||||
$this->assertEquals(1, strlen($autoname2));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue