-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Testing): Add ResponseFactoryAssert
- Loading branch information
Showing
17 changed files
with
1,421 additions
and
83 deletions.
There are no files selected for viewing
424 changes: 424 additions & 0 deletions
424
src/Testing/Laravel/Contracts/Routing/ResponseFactoryAssert.php
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
src/Testing/Laravel/Contracts/Routing/ResponseFactoryDownloadExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryDownloadExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, array, mixed, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $file, | ||
public readonly mixed $name = null, | ||
public readonly array $headers = [], | ||
public readonly mixed $disposition = 'attachment', | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Testing/Laravel/Contracts/Routing/ResponseFactoryFileExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryFileExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, array, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $file, | ||
public readonly array $headers = [], | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Testing/Laravel/Contracts/Routing/ResponseFactoryJsonExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryJsonExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, array, mixed, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $data = [], | ||
public readonly mixed $status = 200, | ||
public readonly array $headers = [], | ||
public readonly mixed $options = 0, | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/Testing/Laravel/Contracts/Routing/ResponseFactoryJsonpExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryJsonpExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, mixed, array, mixed, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $callback, | ||
public readonly mixed $data = [], | ||
public readonly mixed $status = 200, | ||
public readonly array $headers = [], | ||
public readonly mixed $options = 0, | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/Testing/Laravel/Contracts/Routing/ResponseFactoryMakeExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryMakeExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, array, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $content = '', | ||
public readonly mixed $status = 200, | ||
public readonly array $headers = [], | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Testing/Laravel/Contracts/Routing/ResponseFactoryNoContentExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryNoContentExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, array, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $status = 204, | ||
public readonly array $headers = [], | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Testing/Laravel/Contracts/Routing/ResponseFactoryRedirectGuestExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryRedirectGuestExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, mixed, mixed, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $path, | ||
public readonly mixed $status = 302, | ||
public readonly mixed $headers = [], | ||
public readonly mixed $secure = null, | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Testing/Laravel/Contracts/Routing/ResponseFactoryRedirectToActionExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryRedirectToActionExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, mixed, mixed, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $action, | ||
public readonly mixed $parameters = [], | ||
public readonly mixed $status = 302, | ||
public readonly mixed $headers = [], | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Testing/Laravel/Contracts/Routing/ResponseFactoryRedirectToExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryRedirectToExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, mixed, mixed, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $path, | ||
public readonly mixed $status = 302, | ||
public readonly mixed $headers = [], | ||
public readonly mixed $secure = null, | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Testing/Laravel/Contracts/Routing/ResponseFactoryRedirectToIntendedExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryRedirectToIntendedExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, mixed, mixed, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $default = '/', | ||
public readonly mixed $status = 302, | ||
public readonly mixed $headers = [], | ||
public readonly mixed $secure = null, | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Testing/Laravel/Contracts/Routing/ResponseFactoryRedirectToRouteExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryRedirectToRouteExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, mixed, mixed, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $route, | ||
public readonly mixed $parameters = [], | ||
public readonly mixed $status = 302, | ||
public readonly mixed $headers = [], | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/Testing/Laravel/Contracts/Routing/ResponseFactoryStreamDownloadExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryStreamDownloadExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, array, mixed, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $name = null, | ||
public readonly array $headers = [], | ||
public readonly mixed $disposition = 'attachment', | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Testing/Laravel/Contracts/Routing/ResponseFactoryStreamExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryStreamExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, array, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $status = 200, | ||
public readonly array $headers = [], | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Testing/Laravel/Contracts/Routing/ResponseFactoryViewExpectation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaraStrict\Testing\Laravel\Contracts\Routing; | ||
|
||
use Closure; | ||
|
||
final class ResponseFactoryViewExpectation | ||
{ | ||
/** | ||
* @param Closure(mixed, mixed, mixed, array, self):void|null $hook | ||
*/ | ||
public function __construct( | ||
public readonly mixed $return, | ||
public readonly mixed $view, | ||
public readonly mixed $data = [], | ||
public readonly mixed $status = 200, | ||
public readonly array $headers = [], | ||
public readonly ?Closure $hook = null, | ||
) { | ||
} | ||
} |
Oops, something went wrong.