File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1652,6 +1652,23 @@ public function testGetDecryptedCookie()
1652
1652
$ this ->assertSame ('cookie-value ' , $ cookie ->getValue ());
1653
1653
}
1654
1654
1655
+ public function testAssertSessionHasErrors ()
1656
+ {
1657
+ app ()->instance ('session.store ' , $ store = new Store ('test-session ' , new ArraySessionHandler (1 )));
1658
+
1659
+ $ store ->put ('errors ' , $ errorBag = new ViewErrorBag );
1660
+
1661
+ $ errorBag ->put ('default ' , new MessageBag ([
1662
+ 'foo ' => [
1663
+ 'foo is required ' ,
1664
+ ],
1665
+ ]));
1666
+
1667
+ $ response = TestResponse::fromBaseResponse (new Response ());
1668
+
1669
+ $ response ->assertSessionHasErrors (['foo ' ]);
1670
+ }
1671
+
1655
1672
public function testGetEncryptedCookie ()
1656
1673
{
1657
1674
$ container = Container::getInstance ();
You can’t perform that action at this time.
0 commit comments