Skip to content

Commit

Permalink
Upgrade to PHPUnit 8 in support of PHP 8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanhann committed Mar 25, 2021
1 parent 54ad01f commit 1b7c583
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
composer.lock
composer.phar
tests.log
/.phpunit.result.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"ethanhann/redis-raw": "v1.x-dev"
},
"require-dev": {
"phpunit/phpunit": "^7.0",
"phpunit/phpunit": "^8.0",
"mockery/mockery": "^0.9.9",
"predis/predis": "^1.1",
"friendsofphp/php-cs-fixer": "^2.2",
Expand Down
2 changes: 1 addition & 1 deletion tests/RediSearch/Aggregate/AggregationResultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AggregationResultTest extends RediSearchTestCase
protected $subject;
protected $expectedDocuments;

public function setUp()
public function setUp(): void
{
$this->expectedDocuments = [
['title' => 'part1'],
Expand Down
4 changes: 2 additions & 2 deletions tests/RediSearch/Aggregate/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class BuilderTest extends RediSearchTestCase
private $expectedResult3;
private $expectedResult4;

public function setUp()
public function setUp(): void
{
$this->indexName = 'AggregateBuilderTest';
$index = (new TestIndex($this->redisClient, $this->indexName))
Expand Down Expand Up @@ -67,7 +67,7 @@ public function setUp()
$this->subject = (new Builder($this->redisClient, $this->indexName));
}

public function tearDown()
public function tearDown(): void
{
$this->redisClient->flushAll();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/RediSearch/Fields/TextFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TextFieldTest extends TestCase
/** @var float */
private $defaultWeight = 1.0;

public function setUp()
public function setUp(): void
{
$this->subject = new TextField($this->fieldName);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/RediSearch/IndexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class IndexTest extends RediSearchTestCase
/** @var IndexInterface */
private $subject;

public function setUp()
public function setUp(): void
{
$this->indexName = 'ClientTest';
$this->subject = (new TestIndex($this->redisClient, $this->indexName))
Expand All @@ -43,7 +43,7 @@ public function setUp()
$this->logger->debug('setUp...');
}

public function tearDown()
public function tearDown(): void
{
$this->redisClient->flushAll();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/RediSearch/Query/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class BuilderTest extends RediSearchTestCase
private $expectedResult1;
private $expectedResult2;
private $expectedResult3;
public function setUp()
public function setUp(): void
{
$this->indexName = 'QueryBuilderTest';
$index = (new TestIndex($this->redisClient, $this->indexName))
Expand Down Expand Up @@ -54,7 +54,7 @@ public function setUp()
$this->subject = (new Builder($this->redisClient, $this->indexName));
}

public function tearDown()
public function tearDown(): void
{
$this->redisClient->flushAll();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/RediSearch/RuntimeConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ class RuntimeConfigurationTest extends RediSearchTestCase
/** @var RuntimeConfiguration */
private $subject;

public function setUp()
public function setUp(): void
{
$this->subject = (new RuntimeConfiguration($this->redisClient, 'foo'));
}

public function tearDown()
public function tearDown(): void
{
$this->redisClient->flushAll();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/RediSearch/SuggestionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ class SuggestionTest extends RediSearchTestCase
/** @var Suggestion */
private $subject;

public function setUp()
public function setUp(): void
{
$this->subject = (new Suggestion($this->redisClient, 'foo'));
}

public function tearDown()
public function tearDown(): void
{
$this->redisClient->flushAll();
}
Expand Down

0 comments on commit 1b7c583

Please sign in to comment.