Skip to content

Commit 0c902cb

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: relax assertions on generated hashes [Messenger] ensure exception on rollback does not hide previous exception require the writer to implement getFormats() in the translation:extract don't require fake notifier transports to be installed as non-dev dependencies Remove 5.4 branch from PR template [Scheduler] Fix optional count variable in testGetNextRunDates
2 parents ec3423a + 0c7fa99 commit 0c902cb

3 files changed

+9
-9
lines changed

Tests/Fragment/EsiFragmentRendererTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public function testRenderControllerReference()
6060
$reference = new ControllerReference('main_controller', [], []);
6161
$altReference = new ControllerReference('alt_controller', [], []);
6262

63-
$this->assertEquals(
64-
'<esi:include src="/_fragment?_hash=Jz1P8NErmhKTeI6onI1EdAXTB85359MY3RIk5mSJ60w%3D&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller" alt="/_fragment?_hash=iPJEdRoUpGrM1ztqByiorpfMPtiW%2FOWwdH1DBUXHhEc%3D&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dalt_controller" />',
63+
$this->assertMatchesRegularExpression(
64+
'#^<esi:include src="/_fragment\?_hash=.+&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller" alt="/_fragment\?_hash=.+&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dalt_controller" />$#',
6565
$strategy->render($reference, $request, ['alt' => $altReference])->getContent()
6666
);
6767
}
@@ -78,8 +78,8 @@ public function testRenderControllerReferenceWithAbsoluteUri()
7878
$reference = new ControllerReference('main_controller', [], []);
7979
$altReference = new ControllerReference('alt_controller', [], []);
8080

81-
$this->assertSame(
82-
'<esi:include src="http://localhost/_fragment?_hash=Jz1P8NErmhKTeI6onI1EdAXTB85359MY3RIk5mSJ60w%3D&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller" alt="http://localhost/_fragment?_hash=iPJEdRoUpGrM1ztqByiorpfMPtiW%2FOWwdH1DBUXHhEc%3D&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dalt_controller" />',
81+
$this->assertMatchesRegularExpression(
82+
'#^<esi:include src="http://localhost/_fragment\?_hash=.+&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller" alt="http://localhost/_fragment\?_hash=.+&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dalt_controller" />$#',
8383
$strategy->render($reference, $request, ['alt' => $altReference, 'absolute_uri' => true])->getContent()
8484
);
8585
}

Tests/Fragment/HIncludeFragmentRendererTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testRenderWithControllerAndSigner()
3232
{
3333
$strategy = new HIncludeFragmentRenderer(null, new UriSigner('foo'));
3434

35-
$this->assertEquals('<hx:include src="/_fragment?_hash=BP%2BOzCD5MRUI%2BHJpgPDOmoju00FnzLhP3TGcSHbbBLs%3D&amp;_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dmain_controller"></hx:include>', $strategy->render(new ControllerReference('main_controller', [], []), Request::create('/'))->getContent());
35+
$this->assertMatchesRegularExpression('#^<hx:include src="/_fragment\?_hash=.+&amp;_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dmain_controller"></hx:include>$#', $strategy->render(new ControllerReference('main_controller', [], []), Request::create('/'))->getContent());
3636
}
3737

3838
public function testRenderWithUri()

Tests/Fragment/SsiFragmentRendererTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public function testRenderControllerReference()
5151
$reference = new ControllerReference('main_controller', [], []);
5252
$altReference = new ControllerReference('alt_controller', [], []);
5353

54-
$this->assertEquals(
55-
'<!--#include virtual="/_fragment?_hash=Jz1P8NErmhKTeI6onI1EdAXTB85359MY3RIk5mSJ60w%3D&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller" -->',
54+
$this->assertMatchesRegularExpression(
55+
'{^<!--#include virtual="/_fragment\?_hash=.+&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller" -->$}',
5656
$strategy->render($reference, $request, ['alt' => $altReference])->getContent()
5757
);
5858
}
@@ -69,8 +69,8 @@ public function testRenderControllerReferenceWithAbsoluteUri()
6969
$reference = new ControllerReference('main_controller', [], []);
7070
$altReference = new ControllerReference('alt_controller', [], []);
7171

72-
$this->assertSame(
73-
'<!--#include virtual="http://localhost/_fragment?_hash=Jz1P8NErmhKTeI6onI1EdAXTB85359MY3RIk5mSJ60w%3D&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller" -->',
72+
$this->assertMatchesRegularExpression(
73+
'{^<!--#include virtual="http://localhost/_fragment\?_hash=.+&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller" -->$}',
7474
$strategy->render($reference, $request, ['alt' => $altReference, 'absolute_uri' => true])->getContent()
7575
);
7676
}

0 commit comments

Comments
 (0)