Skip to content

Commit

Permalink
4.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Jan 22, 2023
1 parent 23810a8 commit ecc6d28
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Removed

# 4.13.0 (22 January 2023)
## Added
- Support for Laravel Actions package ([#606](https://github.com/knuckleswtf/scribe/pull/606))
- Support nested query parameters in example requests - Bash ([#603](https://github.com/knuckleswtf/scribe/pull/605))


# 4.12.0 (15 January 2023)
## Added
- Allow `Endpoint` attribute to be used at the class level ([#602](https://github.com/knuckleswtf/scribe/pull/602))
Expand Down
2 changes: 1 addition & 1 deletion src/Scribe.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class Scribe
{
public const VERSION = '4.12.0';
public const VERSION = '4.13.0';

/**
* Specify a callback that will be executed just before a response call is made
Expand Down
16 changes: 11 additions & 5 deletions tests/Unit/WritingUtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,18 @@ public function print_query_params_as_string_bash()
{
$queryParams = WritingUtils::printQueryParamsAsString($this->queryParams());

$this->assertEquals(
'name+query=name+value&list+query[]=list+element+1&list+query[]=list+element+2&nested+query[nested+query+level+1+array][nested+query+level+2+list][]=nested+level+2+list+element+1&nested+query[nested+query+level+1+array][nested+query+level+2+list][]=nested+level+2+list+element+2&nested+query[nested+query+level+1+array][nested+query+level+2+query]=name+nested+2&nested+query[nested+query+level+1+query]=name+nested+1',
$queryParams
);
$expected = implode('&', [
'name+query=name+value',
'list+query[]=list+element+1',
'list+query[]=list+element+2',
'nested+query[nested+query+level+1+array][nested+query+level+2+list][]=nested+level+2+list+element+1',
'nested+query[nested+query+level+1+array][nested+query+level+2+list][]=nested+level+2+list+element+2',
'nested+query[nested+query+level+1+array][nested+query+level+2+query]=name+nested+2',
'nested+query[nested+query+level+1+query]=name+nested+1',
]);
$this->assertEquals($expected, $queryParams);
}

private function queryParams(): array
{
return [
Expand Down

0 comments on commit ecc6d28

Please sign in to comment.