Skip to content

Commit 8bb8cdb

Browse files
committed
Bug fix
1 parent b0e9f49 commit 8bb8cdb

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/Database/Document.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(array $input = [])
5050
}
5151
}
5252

53-
unset($value);
53+
unset($value); // Unset Reference
5454

5555
parent::__construct($input);
5656
}

tests/unit/DocumentTest.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,18 @@ public function tearDown(): void
7070

7171
public function testDocumentNulls(): void
7272
{
73-
// $doc = new \ArrayObject($nulls);
74-
// var_dump(isset($doc['error']));
75-
// var_dump(isset($doc['$dog']));
76-
7773
$data = [
7874
'$permissions' => null,
79-
'dog' => null,
80-
//'bla' => true, // When adding this line, tests are passing, meaning the 'dog' => null entry is not last in the document
75+
'dog' => null, // last entry is null
8176
];
8277

83-
$this->assertEquals(null, $data['dog']);
84-
$this->assertEquals(false, isset($data['dog']));
85-
8678
$document = new Document($data);
8779

8880
$this->assertEquals(null, $document['$permissions']);
8981
$this->assertEquals(false, isset($document['$permissions']));
9082

9183
$this->assertEquals(null, $document['dog']);
92-
$this->assertEquals(false, isset($document['dog'])); // Why is failing?????
84+
$this->assertEquals(false, isset($document['dog']));
9385
}
9486

9587
public function testId(): void

0 commit comments

Comments
 (0)