Permalink
Browse files

updated to nette/http: removed second parameter from Request

  • Loading branch information...
dg committed Feb 12, 2019
1 parent e0c3c06 commit 802d943200e838864130d39ec7005b607086b92f
Showing with 8 additions and 8 deletions.
  1. +8 −8 tests/Responses/FileResponse.range.phpt
@@ -22,7 +22,7 @@ $origData = file_get_contents($file);
test(function () use ($fileResponse, $origData) {
ob_start();
$fileResponse->send(
new Http\Request(new Http\UrlScript, null, null, null, null, ['range' => 'bytes=10-20']),
new Http\Request(new Http\UrlScript, null, null, null, ['range' => 'bytes=10-20']),
$response = new Http\Response
);
Assert::same(substr($origData, 10, 11), ob_get_clean());
@@ -33,7 +33,7 @@ test(function () use ($fileResponse, $origData) {
test(function () use ($fileResponse, $origData) {
ob_start();
$fileResponse->send(
new Http\Request(new Http\UrlScript, null, null, null, null, ['range' => 'bytes=10-10']),
new Http\Request(new Http\UrlScript, null, null, null, ['range' => 'bytes=10-10']),
new Http\Response
);
Assert::same(substr($origData, 10, 1), ob_get_clean());
@@ -43,7 +43,7 @@ test(function () use ($fileResponse, $origData) {
test(function () use ($fileResponse, $origData, $file) {
ob_start();
$fileResponse->send(
new Http\Request(new Http\UrlScript, null, null, null, null, ['range' => 'bytes=10-' . filesize($file)]),
new Http\Request(new Http\UrlScript, null, null, null, ['range' => 'bytes=10-' . filesize($file)]),
new Http\Response
);
Assert::same(substr($origData, 10), ob_get_clean());
@@ -53,7 +53,7 @@ test(function () use ($fileResponse, $origData, $file) {
test(function () use ($fileResponse, $origData) { // prefix
ob_start();
$fileResponse->send(
new Http\Request(new Http\UrlScript, null, null, null, null, ['range' => 'bytes=20-']),
new Http\Request(new Http\UrlScript, null, null, null, ['range' => 'bytes=20-']),
new Http\Response
);
Assert::same(substr($origData, 20), ob_get_clean());
@@ -63,7 +63,7 @@ test(function () use ($fileResponse, $origData) { // prefix
test(function () use ($fileResponse, $origData, $file) { // prefix
ob_start();
$fileResponse->send(
new Http\Request(new Http\UrlScript, null, null, null, null, ['range' => 'bytes=' . (filesize($file) - 1) . '-']),
new Http\Request(new Http\UrlScript, null, null, null, ['range' => 'bytes=' . (filesize($file) - 1) . '-']),
new Http\Response
);
Assert::same(substr($origData, -1), ob_get_clean());
@@ -73,7 +73,7 @@ test(function () use ($fileResponse, $origData, $file) { // prefix
test(function () use ($fileResponse, $file) { // prefix
ob_start();
$fileResponse->send(
new Http\Request(new Http\UrlScript, null, null, null, null, ['range' => 'bytes=' . filesize($file) . '-']),
new Http\Request(new Http\UrlScript, null, null, null, ['range' => 'bytes=' . filesize($file) . '-']),
$response = new Http\Response
);
Assert::same('', ob_get_clean());
@@ -84,7 +84,7 @@ test(function () use ($fileResponse, $file) { // prefix
test(function () use ($fileResponse, $origData) { // suffix
ob_start();
$fileResponse->send(
new Http\Request(new Http\UrlScript, null, null, null, null, ['range' => 'bytes=-20']),
new Http\Request(new Http\UrlScript, null, null, null, ['range' => 'bytes=-20']),
new Http\Response
);
Assert::same(substr($origData, -20), ob_get_clean());
@@ -94,7 +94,7 @@ test(function () use ($fileResponse, $origData) { // suffix
test(function () use ($fileResponse, $origData, $file) { // suffix
ob_start();
$fileResponse->send(
new Http\Request(new Http\UrlScript, null, null, null, null, ['range' => 'bytes=-' . filesize($file)]),
new Http\Request(new Http\UrlScript, null, null, null, ['range' => 'bytes=-' . filesize($file)]),
new Http\Response
);
Assert::same($origData, ob_get_clean());

0 comments on commit 802d943

Please sign in to comment.