Skip to content

Commit

Permalink
change to the latest PHPUnit-supported writing style
Browse files Browse the repository at this point in the history
  • Loading branch information
serima committed Jul 25, 2020
1 parent 39ced8d commit 549f208
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions tests/BenchmarkTest.php
Expand Up @@ -2,7 +2,6 @@

namespace Flexihash\Tests;

use PHPUnit_Framework_TestCase;
use Flexihash\Flexihash;
use Flexihash\Hasher\Crc32Hasher;
use Flexihash\Hasher\Md5Hasher;
Expand All @@ -14,7 +13,7 @@
* @group benchmark
* @license http://www.opensource.org/licenses/mit-license.php
*/
class BenchmarkTest extends PHPUnit_Framework_TestCase
class BenchmarkTest extends \PHPUnit\Framework\TestCase
{
private $targets = 10;
private $lookups = 1000;
Expand Down
7 changes: 3 additions & 4 deletions tests/FlexihashTest.php
Expand Up @@ -2,15 +2,14 @@

namespace Flexihash\Tests;

use PHPUnit_Framework_TestCase;
use Flexihash\Flexihash;
use Flexihash\Tests\Hasher\MockHasher;

/**
* @author Paul Annesley
* @license http://www.opensource.org/licenses/mit-license.php
*/
class FlexihashTest extends PHPUnit_Framework_TestCase
class FlexihashTest extends \PHPUnit\Framework\TestCase
{
public function testGetAllTargetsEmpty()
{
Expand All @@ -22,7 +21,7 @@ public function testAddTargetThrowsExceptionOnDuplicateTarget()
{
$hashSpace = new Flexihash();
$hashSpace->addTarget('t-a');
$this->setExpectedException('Flexihash\Exception');
$this->expectException('Flexihash\Exception');
$hashSpace->addTarget('t-a');
}

Expand Down Expand Up @@ -62,7 +61,7 @@ public function testRemoveTarget()
public function testRemoveTargetFailsOnMissingTarget()
{
$hashSpace = new Flexihash();
$this->setExpectedException('Flexihash\Exception');
$this->expectException('Flexihash\Exception');
$hashSpace->removeTarget('not-there');
}

Expand Down
3 changes: 1 addition & 2 deletions tests/Hasher/HasherTest.php
Expand Up @@ -2,15 +2,14 @@

namespace Flexihash\Tests\Hasher;

use PHPUnit_Framework_TestCase;
use Flexihash\Hasher\Crc32Hasher;
use Flexihash\Hasher\Md5Hasher;

/**
* @author Paul Annesley
* @license http://www.opensource.org/licenses/mit-license.php
*/
class HasherTest extends PHPUnit_Framework_TestCase
class HasherTest extends \PHPUnit\Framework\TestCase
{
public function testCrc32Hash()
{
Expand Down

0 comments on commit 549f208

Please sign in to comment.