mirror of
https://github.com/predis/predis.git
synced 2026-09-12 11:27:05 +00:00
Removed redundant constants
This commit is contained in:
@@ -49,7 +49,6 @@
|
||||
<php>
|
||||
<const name="REDIS_SERVER_HOST" value="127.0.0.1" />
|
||||
<const name="REDIS_SERVER_PORT" value="6379" />
|
||||
<const name="REDIS_SERVER_GEARS_PORT" value="6380" />
|
||||
<const name="REDIS_SERVER_DBNUM" value="0" />
|
||||
<env name="USE_RELAY" value="false" />
|
||||
|
||||
|
||||
@@ -176,9 +176,7 @@ abstract class PredisTestCase extends \PHPUnit\Framework\TestCase
|
||||
return [
|
||||
'scheme' => 'tcp',
|
||||
'host' => constant('REDIS_SERVER_HOST'),
|
||||
'port' => ($this->isRedisGearsTest())
|
||||
? constant('REDIS_SERVER_GEARS_PORT')
|
||||
: constant('REDIS_SERVER_PORT'),
|
||||
'port' => constant('REDIS_SERVER_PORT'),
|
||||
'database' => constant('REDIS_SERVER_DBNUM'),
|
||||
];
|
||||
}
|
||||
@@ -581,24 +579,6 @@ abstract class PredisTestCase extends \PHPUnit\Framework\TestCase
|
||||
&& in_array('cluster', $annotations['method']['group'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check annotations if it's matches to redis gears test scenario.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function isRedisGearsTest(): bool
|
||||
{
|
||||
$annotations = TestUtil::parseTestMethodAnnotations(
|
||||
get_class($this),
|
||||
$this->getName(false)
|
||||
);
|
||||
|
||||
return isset($annotations['method']['requiresRedisGearsVersion'], $annotations['method']['group'])
|
||||
&& !empty($annotations['method']['requiresRedisGearsVersion'])
|
||||
&& in_array('connected', $annotations['method']['group'], true)
|
||||
&& in_array('gears', $annotations['method']['group'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse comma-separated cluster endpoints and convert them into tcp strings.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user