mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 22:14:03 +00:00
[2.2.0] Timestamps (#213)
* Timestamps * Apply fixes from StyleCI * Add void typehint * wip * Fix tests * Apply fixes from StyleCI
This commit is contained in:
parent
b0c8e92bb4
commit
31c9930c93
6 changed files with 124 additions and 4 deletions
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Tests;
|
||||
|
||||
class TenantConfigTest extends TestCase
|
||||
{
|
||||
public $autoInitTenancy = false;
|
||||
public $autoCreateTenant = false;
|
||||
|
||||
/** @test */
|
||||
public function config_is_merged_and_removed()
|
||||
{
|
||||
$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()->create('foo.localhost', [
|
||||
'paypal_api_public' => 'foo',
|
||||
'paypal_api_private' => 'bar',
|
||||
]);
|
||||
|
||||
tenancy()->init('foo.localhost');
|
||||
$this->assertSame(['public' => 'foo', 'private' => 'bar'], config('services.paypal'));
|
||||
|
||||
tenancy()->end();
|
||||
$this->assertSame([
|
||||
'public' => null,
|
||||
'private' => null,
|
||||
], config('services.paypal'));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue