We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77bbafd commit 720b465Copy full SHA for 720b465
src/StaticEntityManager.php
@@ -83,7 +83,7 @@ public function getAll()
83
$this->createInstance($id);
84
}
85
86
- return $this->instances;
+ return array_filter($this->instances);
87
88
89
/**
tests/StaticEntityTest.php
@@ -120,6 +120,14 @@ public function testGetAllTwice()
120
$this->assertSame($all1, $all2);
121
122
123
+ public function testGetAllAfterInexistent()
124
+ {
125
+ Civility::get('not-exists');
126
+ $all = Civility::getAll();
127
+
128
+ $this->assertArrayNotHasKey('not-exists', $all);
129
+ }
130
131
public function testGetAssoc()
132
{
133
$assoc = Civility::getAssociative();
0 commit comments