Commit 5612ad1 1 parent 0f53990 commit 5612ad1 Copy full SHA for 5612ad1
File tree 3 files changed +31
-6
lines changed
3 files changed +31
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
All Notable changes to ` laravel-missing-page-redirector ` will be documented in this file
4
4
5
+ ## 1.2.0 - 2016-01-23
6
+
7
+ - add support for Laravel 5.4
8
+ - drop support for Laravel 5.3
9
+
5
10
## 1.1.0 - 2016-10-27
6
11
7
12
- add support for determining http status code for a redirect
8
13
9
-
10
14
## 1.0.0 - 2016-10-14
11
15
12
16
- initial release
Original file line number Diff line number Diff line change 17
17
],
18
18
"require" : {
19
19
"php" : " ^7.0" ,
20
- "illuminate/http " : " ~5.3 .0" ,
21
- "illuminate/routing " : " ~5.3 .0" ,
22
- "illuminate/support " : " ~5.3 .0" ,
20
+ "illuminate/routing " : " ~5.4 .0" ,
21
+ "illuminate/support " : " ~5.4 .0" ,
22
+ "illuminate/pipeline " : " ~5.4 .0" ,
23
23
"spatie/url" : " ^1.0"
24
24
},
25
25
"require-dev" : {
26
- "phpunit/phpunit" : " 5.*" ,
27
- "orchestra/testbench" : " ^3.3"
26
+ "laravel/browser-kit-testing" : " ^1.0" ,
27
+ "orchestra/testbench" : " ~3.4.0" ,
28
+ "phpunit/phpunit" : " 5.*"
28
29
},
29
30
"autoload" : {
30
31
"psr-4" : {
Original file line number Diff line number Diff line change 2
2
3
3
namespace Spatie \MissingPageRedirector \Test ;
4
4
5
+ use Laravel \BrowserKitTesting \Concerns \MakesHttpRequests ;
5
6
use Route ;
6
7
use Illuminate \Contracts \Http \Kernel ;
7
8
use Orchestra \Testbench \TestCase as Orchestra ;
8
9
use Spatie \MissingPageRedirector \RedirectsMissingPages ;
10
+ use PHPUnit_Framework_Assert as PHPUnit ;
9
11
10
12
abstract class TestCase extends Orchestra
11
13
{
14
+ use MakesHttpRequests;
15
+
12
16
public function setUp ()
13
17
{
14
18
parent ::setUp ();
@@ -51,4 +55,20 @@ protected function setUpRoutes($app)
51
55
abort ($ responseCode );
52
56
});
53
57
}
58
+
59
+ /**
60
+ * Assert whether the client was redirected to a given URI.
61
+ *
62
+ * @param string $uri
63
+ * @param array $with
64
+ * @return $this
65
+ */
66
+ public function assertRedirectedTo ($ uri , $ with = [])
67
+ {
68
+ PHPUnit::assertInstanceOf ('Illuminate\Http\RedirectResponse ' , $ this ->response );
69
+
70
+ PHPUnit::assertEquals ($ this ->app ['url ' ]->to ($ uri ), $ this ->response ->headers ->get ('Location ' ));
71
+
72
+ return $ this ;
73
+ }
54
74
}
You can’t perform that action at this time.
0 commit comments