File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public function setUp()
52
52
/**
53
53
* @test
54
54
*/
55
- public function addRedirectTrimsLeadingAndTrailingSlashesOfSourceAndTargetPath ()
55
+ public function addRedirectTrimsLeadingAndTrailingSlashesOfSourcePath ()
56
56
{
57
57
$ this ->assertEquals (0 , $ this ->redirectRepository ->countAll ());
58
58
$ this ->redirectStorage ->addRedirect ('/some/source/path/ ' , '/some/target/path/ ' );
@@ -62,7 +62,21 @@ public function addRedirectTrimsLeadingAndTrailingSlashesOfSourceAndTargetPath()
62
62
$ redirect = $ this ->redirectRepository ->findAll ()->current ();
63
63
64
64
$ this ->assertSame ('some/source/path ' , $ redirect ->getSourceUriPath ());
65
- $ this ->assertSame ('some/target/path ' , $ redirect ->getTargetUriPath ());
65
+ }
66
+
67
+ /**
68
+ * @test
69
+ */
70
+ public function addRedirectTrimsLeadingSlashesOfTargetPath ()
71
+ {
72
+ $ this ->assertEquals (0 , $ this ->redirectRepository ->countAll ());
73
+ $ this ->redirectStorage ->addRedirect ('/some/source/path/ ' , '/some/target/path/ ' );
74
+
75
+ $ this ->persistenceManager ->persistAll ();
76
+ /** @var RedirectInterface $redirect */
77
+ $ redirect = $ this ->redirectRepository ->findAll ()->current ();
78
+
79
+ $ this ->assertSame ('some/target/path/ ' , $ redirect ->getTargetUriPath ());
66
80
}
67
81
68
82
/**
You can’t perform that action at this time.
0 commit comments