Skip to content

Commit 0eb07c9

Browse files
committed
Add additional tests for 100% coverage
1 parent 8764d09 commit 0eb07c9

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests/BriefTest.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,13 @@ public function testCanDeleteDataFromBrief(): void {
490490
$this->assertEquals('value', $NumericBrief->_0);
491491
$NumericBrief->delete(0);
492492
$this->assertNull($NumericBrief->_0);
493-
493+
/**
494+
* There's no way to verify that something that doesn't exist was
495+
* or wasn't deleted, but we try to make sure no errors are thrown.
496+
*/
497+
$this->assertNull($Brief[new \stdClass()]);
498+
$Brief->delete(new \stdClass());
499+
$this->assertNull($Brief[new \stdClass()]);
494500
}
495501

496502
public function testAccessAsArray(): void {
@@ -501,6 +507,13 @@ public function testAccessAsArray(): void {
501507
$NumericBrief[1] = 'another-value';
502508
$this->assertEquals('another-value', $NumericBrief[1]);
503509
}
510+
511+
public function testOffsetMehtods(): void {
512+
$Brief = Brief::make(['key' => 'value']);
513+
$this->assertTrue($Brief->offsetExists('key'));
514+
$Brief->offsetUnset('key');
515+
$this->assertFalse($Brief->offsetExists('key'));
516+
}
504517
}
505518

506519
/**

0 commit comments

Comments
 (0)