8000 minor #19554 [Routing] Reorder assert parameters (Ener-Getick) · symfony/symfony@00e2a42 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 00e2a42

Browse files
committed
minor #19554 [Routing] Reorder assert parameters (Ener-Getick)
This PR was merged into the 2.7 branch. Discussion ---------- [Routing] Reorder assert parameters | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | The expected value must be the first parameter. Commits ------- 7f88796 [Routing] Reorder assert parameters
2 parents 3936c4b + 7f88796 commit 00e2a42

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ public function testDumpWithRoutes()
7777
$relativeUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_PATH);
7878
$relativeUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), UrlGeneratorInterface::ABSOLUTE_PATH);
7979

80-
$this->assertEquals($absoluteUrlWithParameter, 'http://localhost/app.php/testing/bar');
81-
$this->assertEquals($absoluteUrlWithoutParameter, 'http://localhost/app.php/testing2');
82-
$this->assertEquals($relativeUrlWithParameter, '/app.php/testing/bar');
83-
$this->assertEquals($relativeUrlWithoutParameter, '/app.php/testing2');
80+
$this->assertEquals('http://localhost/app.php/testing/bar', $absoluteUrlWithParameter);
81+
$this->assertEquals('http://localhost/app.php/testing2', $absoluteUrlWithoutParameter);
82+
$this->assertEquals('/app.php/testing/bar', $relativeUrlWithParameter);
83+
$this->assertEquals('/app.php/testing2', $relativeUrlWithoutParameter);
8484
}
8585

8686
public function testDumpWithTooManyRoutes()
@@ -108,10 +108,10 @@ public function testDumpWithTooManyRoutes()
108108
$relativeUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_PATH);
109109
$relativeUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), UrlGeneratorInterface::ABSOLUTE_PATH);
110110

111-
$this->assertEquals($absoluteUrlWithParameter, 'http://localhost/app.php/testing/bar');
112-
$this->assertEquals($absoluteUrlWithoutParameter, 'http://localhost/app.php/testing2');
113-
$this->assertEquals($relativeUrlWithParameter, '/app.php/testing/bar');
114-
$this->assertEquals($relativeUrlWithoutParameter, '/app.php/testing2');
111+
$this->assertEquals('http://localhost/app.php/testing/bar', $absoluteUrlWithParameter);
112+
$this->assertEquals('http://localhost/app.php/testing2', $absoluteUrlWithoutParameter);
113+
$this->assertEquals('/app.php/testing/bar', $relativeUrlWithParameter);
114+
$this->assertEquals('/app.php/testing2', $relativeUrlWithoutParameter);
115115
}
116116

117117
/**
@@ -151,7 +151,7 @@ public function testDumpForRouteWithDefaults()
151151
$projectUrlGenerator = new \DefaultRoutesUrlGenerator(new RequestContext());
152152
$url = $projectUrlGenerator->generate('Test', array());
153153

154-
$this->assertEquals($url, '/testing');
154+
$this->assertEquals('/testing', $url);
155155
}
156156

157157
public function testDumpWithSchemeRequirement()
@@ -166,15 +166,15 @@ public function testDumpWithSchemeRequirement()
166166
$absoluteUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_URL);
167167
$relativeUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_PATH);
168168

169-
$this->assertEquals($absoluteUrl, 'ftp://localhost/app.php/testing');
170-
$this->assertEquals($relativeUrl, 'ftp://localhost/app.php/testing');
169+
$this->assertEquals('ftp://localhost/app.php/testing', $absoluteUrl);
170+
$this->assertEquals('ftp://localhost/app.php/testing', $relativeUrl);
171171

172172
$projectUrlGenerator = new \SchemeUrlGenerator(new RequestContext('/app.php', 'GET', 'localhost', 'https'));
173173

174174
$absoluteUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_URL);
175175
$relativeUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_PATH);
176176

177-
$this->assertEquals($absoluteUrl, 'https://localhost/app.php/testing');
178-
$this->assertEquals($relativeUrl, '/app.php/testing');
177+
$this->assertEquals('https://localhost/app.php/testing', $absoluteUrl);
178+
$this->assertEquals('/app.php/testing', $relativeUrl);
179179
}
180180
}

0 commit comments

Comments
 (0)
0