Skip to content

Commit

Permalink
allow to set a single context value
Browse files Browse the repository at this point in the history
  • Loading branch information
Gummibeer committed Aug 5, 2024
1 parent e9dac03 commit afec902
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Http/Faking/Fixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,16 @@ public function getContext(?string $key = null): mixed
return $this->context->get($key);
}

/**
* Set a specific context value
*/
public function setContext(string $key, mixed $value): static
{
$this->context->add($key, $value);

return $this;
}

/**
* Merge context values into the fixture
* @param array<string, mixed> $context
Expand Down

0 comments on commit afec902

Please sign in to comment.