Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
3.2.0 readiness
Browse files Browse the repository at this point in the history
  • Loading branch information
Xerkus committed Apr 7, 2018
2 parents c9d0a21 + b01ef3a commit 6266064
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 3.1.2 - TBD
## 3.2.0 - 2018-04-07

### Added

- [#60](https://github.com/zendframework/zend-test/pull/60) Added support for
PHPUnit 7
- [#65](https://github.com/zendframework/zend-test/pull/65) Added support for
query parameters in DELETE request in AbstractControllerTestCase

### Deprecated

Expand Down
1 change: 1 addition & 0 deletions src/PHPUnit/Controller/AbstractControllerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ public function url($url, $method = HttpRequest::METHOD_GET, $params = [])
$post = $params;
break;
case HttpRequest::METHOD_GET:
case HttpRequest::METHOD_DELETE:
$query = array_merge($query, $params);
break;
case HttpRequest::METHOD_PUT:
Expand Down
7 changes: 7 additions & 0 deletions test/PHPUnit/Controller/AbstractControllerTestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ public function method()
{
yield 'null' => [null];
yield 'get' => ['GET'];
yield 'delete' => ['DELETE'];
yield 'post' => ['POST'];
yield 'put' => ['PUT'];
yield 'patch' => ['PATCH'];
Expand All @@ -507,4 +508,10 @@ public function testDispatchWithNullParams($method)
$this->dispatch('/custom-response', $method, null);
$this->assertResponseStatusCode(999);
}

public function testQueryParamsDelete()
{
$this->dispatch('/tests', 'DELETE', ['foo' => 'bar']);
$this->assertEquals('foo=bar', $this->getRequest()->getQuery()->toString());
}
}

0 comments on commit 6266064

Please sign in to comment.