1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 21:24:04 +00:00

Revert travis changes & add a version check to predis tests

This commit is contained in:
Samuel Štancl 2019-07-03 14:02:58 +02:00
parent f15d84954a
commit e8b9d6f24b
2 changed files with 10 additions and 3 deletions

View file

@ -1,7 +1,6 @@
env: env:
- LARAVEL_VERSION="5.7.*" TESTBENCH_VERSION="~3.7" REDIS_DRIVER=phpredis - LARAVEL_VERSION="5.7.*" TESTBENCH_VERSION="~3.7" REDIS_DRIVER=phpredis
- LARAVEL_VERSION="5.8.*" TESTBENCH_VERSION="~3.8" REDIS_DRIVER=phpredis - LARAVEL_VERSION="5.8.*" TESTBENCH_VERSION="~3.8" REDIS_DRIVER=phpredis
- LARAVEL_VERSION="5.8.*" TESTBENCH_VERSION="~3.8" REDIS_DRIVER=predis
language: php language: php
php: php:
@ -12,10 +11,10 @@ services:
- redis-server - redis-server
before_install: before_install:
- if [[ "$REDIS_DRIVER" = "phpredis" ]]; then echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
install: install:
- composer require "laravel/framework:$LARAVEL_VERSION" "orchestra/testbench:$TESTBENCH_VERSION" - travis_retry composer require "laravel/framework:$LARAVEL_VERSION" "orchestra/testbench:$TESTBENCH_VERSION"
- travis_retry composer install --no-interaction - travis_retry composer install --no-interaction
before_script: before_script:

View file

@ -35,6 +35,10 @@ class BootstrapsTenancyTest extends TestCase
/** @test */ /** @test */
public function predis_is_supported() public function predis_is_supported()
{ {
if (app()->version() < 'v5.8.27') {
$this->markTestSkipped();
}
Config::set('database.redis.client', 'predis'); Config::set('database.redis.client', 'predis');
Redis::setDriver('predis'); Redis::setDriver('predis');
Config::set('tenancy.redis.tenancy', false); Config::set('tenancy.redis.tenancy', false);
@ -46,6 +50,10 @@ class BootstrapsTenancyTest extends TestCase
/** @test */ /** @test */
public function predis_is_not_supported_without_disabling_redis_multitenancy() public function predis_is_not_supported_without_disabling_redis_multitenancy()
{ {
if (app()->version() < 'v5.8.27') {
$this->markTestSkipped();
}
Config::set('database.redis.client', 'predis'); Config::set('database.redis.client', 'predis');
Redis::setDriver('predis'); Redis::setDriver('predis');
Config::set('tenancy.redis.tenancy', true); Config::set('tenancy.redis.tenancy', true);