Skip to content

Commit

Permalink
fix: unit tests error, add more asserts check
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Nov 30, 2021
1 parent 45820af commit c9d097e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
*/
class Collection extends \Toolkit\Stdlib\Std\Collection
{

/**
* @var int
*/
Expand All @@ -58,7 +57,7 @@ class Collection extends \Toolkit\Stdlib\Std\Collection
*
* @return mixed
*/
public function set(string $key, $value): self
public function set(string $key, mixed $value): self
{
if ($this->keyPathSep && strpos($key, $this->keyPathSep) > 0) {
Arr::setByPath($this->data, $key, $value, $this->keyPathSep);
Expand Down
5 changes: 4 additions & 1 deletion test/ConfigBoxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public function testNewFromFiles(): void
]);

vdump($c);
$this->assertEquals('inher', $c->get('name'));
$this->assertEquals('inhere', $c->get('name'));
$this->assertTrue($c->has('atIni'));
$this->assertTrue($c->has('atNeon'));
$this->assertTrue($c->has('atYaml'));
}
}

0 comments on commit c9d097e

Please sign in to comment.