mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 09:54:03 +00:00
[3.x] Use static properties instead of config for features (#391)
* Use static properites instead of config for features * update tests
This commit is contained in:
parent
3bb2759fe2
commit
c2c90ff755
4 changed files with 14 additions and 13 deletions
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Stancl\Tenancy\Tests\Features;
|
||||
|
||||
use Stancl\Tenancy\Features\TenantConfig;
|
||||
use Stancl\Tenancy\Tests\TestCase;
|
||||
|
||||
class TenantConfigTest extends TestCase
|
||||
|
|
@ -16,12 +17,12 @@ class TenantConfigTest extends TestCase
|
|||
{
|
||||
$this->assertSame(null, config('services.paypal'));
|
||||
config([
|
||||
'tenancy.storage_to_config_map' => [
|
||||
'paypal_api_public' => 'services.paypal.public',
|
||||
'paypal_api_private' => 'services.paypal.private',
|
||||
],
|
||||
'tenancy.features' => ['Stancl\Tenancy\Features\TenantConfig'],
|
||||
'tenancy.features' => [TenantConfig::class],
|
||||
]);
|
||||
TenantConfig::$storageToConfigMap = [
|
||||
'paypal_api_public' => 'services.paypal.public',
|
||||
'paypal_api_private' => 'services.paypal.private',
|
||||
];
|
||||
|
||||
tenancy()->create('foo.localhost', [
|
||||
'paypal_api_public' => 'foo',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue