File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16555,32 +16555,13 @@ public function testSharedTablesTenantPerDocument(): void
1655516555
1655616556 $this->assertEquals(1, \count($docs));
1655716557
16558- // Ensure no cross-tenant upsert
16559- try {
16560- $database
16561- ->setTenant(null)
16562- ->setTenantPerDocument(true)
16563- ->createOrUpdateDocuments(__FUNCTION__, [new Document([
16564- '$id' => $doc3Id,
16565- '$tenant' => 1,
16566- 'name' => 'Superman updated',
16567- ])]);
16568-
16569- $this->fail('Expected to throw for cross-tenant upsert');
16570- } catch (\Throwable) {
16571- // Expected
16572- }
16573-
1657416558 // Ensure no cross-tenant read from upsert
16575- try {
16576- $database
16577- ->setTenant(1)
16578- ->setTenantPerDocument(false)
16579- ->getDocument(__FUNCTION__, $doc3Id);
16580- $this->fail('Expected to throw for cross-tenant read');
16581- } catch (\Throwable) {
16582- // Expected
16583- }
16559+ $doc = $database
16560+ ->setTenant(1)
16561+ ->setTenantPerDocument(false)
16562+ ->getDocument(__FUNCTION__, $doc3Id);
16563+
16564+ $this->assertEquals(true, $doc->isEmpty());
1658416565
1658516566 // Upsert new documents with different tenants
1658616567 $doc4Id = ID::unique();
You can’t perform that action at this time.
0 commit comments