1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:24:03 +00:00

Add tests, fix bugs

This commit is contained in:
Samuel Štancl 2019-02-08 15:28:32 +01:00
parent 3857c4a27d
commit f05a4bca41
6 changed files with 122 additions and 16 deletions

View file

@ -212,7 +212,7 @@ class TenantManager
return $this->storage->getMany($uuid, $key);
}
return $this->storage->get($this->tenant['uuid'], $key);
return $this->storage->get($uuid, $key);
}
/**
@ -247,7 +247,11 @@ class TenantManager
throw new \Exception("No value supplied for key $key.");
}
return $target[$key] = $this->storage->putMany($uuid, $key);
foreach ($this->storage->putMany($uuid, $key) as $key => $value) {
$target[$key] = $value;
}
return $key;
}
/**
@ -260,9 +264,7 @@ class TenantManager
*/
public function set($key, $value = null, string $uuid = null)
{
$uuid = $uuid ?: $this->tenant['uuid'];
return $this->put($this->put($key, $value));
return $this->put($key, $value, $uuid);
}
/**