Skip to content

Commit a264b8b

Browse files
committed
Updated tests to comply with newer azjezz/psl:^3 version
Notably: no changes in any sources, yay!
1 parent 57e9ca6 commit a264b8b

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

test/unit/Command/AssertBackwardsCompatibleTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ public function testDefinition(): void
126126

127127
public function testExecuteWhenRevisionsAreProvidedAsOptions(): void
128128
{
129-
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('fromRevision')->finalize();
130-
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('toRevision')->finalize();
129+
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('fromRevision')->finalize();
130+
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('toRevision')->finalize();
131131

132132
$this->input->method('getOption')->willReturnMap([
133133
['from', $fromSha],
@@ -191,8 +191,8 @@ public function testExecuteWhenRevisionsAreProvidedAsOptions(): void
191191

192192
public function testExecuteWhenDevelopmentDependenciesAreRequested(): void
193193
{
194-
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('fromRevision')->finalize();
195-
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('toRevision')->finalize();
194+
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('fromRevision')->finalize();
195+
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('toRevision')->finalize();
196196

197197
$this->input->method('getOption')->willReturnMap([
198198
['from', $fromSha],
@@ -256,8 +256,8 @@ public function testExecuteWhenDevelopmentDependenciesAreRequested(): void
256256

257257
public function testExecuteReturnsNonZeroExitCodeWhenChangesAreDetected(): void
258258
{
259-
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('fromRevision')->finalize();
260-
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('toRevision')->finalize();
259+
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('fromRevision')->finalize();
260+
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('toRevision')->finalize();
261261

262262
$this->input->method('getOption')->willReturnMap([
263263
['from', $fromSha],
@@ -334,8 +334,8 @@ public function testExecuteReturnsNonZeroExitCodeWhenChangesAreDetected(): void
334334

335335
public function testProvidingMarkdownOptionWritesMarkdownOutput(): void
336336
{
337-
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('fromRevision')->finalize();
338-
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('toRevision')->finalize();
337+
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('fromRevision')->finalize();
338+
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('toRevision')->finalize();
339339

340340
$this->input->method('getOption')->willReturnMap([
341341
['from', $fromSha],
@@ -449,8 +449,8 @@ public function testExecuteWithDefaultRevisionsNotProvidedAndNoDetectedTags(): v
449449
/** @dataProvider validVersionCollections */
450450
public function testExecuteWithDefaultRevisionsNotProvided(VersionCollection $versions): void
451451
{
452-
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('fromRevision')->finalize();
453-
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('toRevision')->finalize();
452+
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('fromRevision')->finalize();
453+
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('toRevision')->finalize();
454454
$pickedVersion = $this->makeVersion('1.0.0');
455455

456456
$this->input->method('getOption')->willReturnMap([

test/unit/Git/RevisionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class RevisionTest extends TestCase
1616
{
1717
public function testFromSha1WithValidSha1(): void
1818
{
19-
$sha1 = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)
19+
$sha1 = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)
2020
->update(SecureRandom\string(8))
2121
->finalize();
2222

@@ -25,7 +25,7 @@ public function testFromSha1WithValidSha1(): void
2525

2626
public function testFromSha1WithNewlinesStillProvidesValidSha1(): void
2727
{
28-
$sha1 = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)
28+
$sha1 = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)
2929
->update(SecureRandom\string(8))
3030
->finalize();
3131

test/unit/SourceLocator/StaticClassMapSourceLocatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected function setUp(): void
3737
public function testRejectsEmptyKeys(): void
3838
{
3939
$this->expectException(CoercionException::class);
40-
$this->expectExceptionMessage('Could not coerce "string" to type "non-empty-string".');
40+
$this->expectExceptionMessage('Could not coerce "string" to type "dict<non-empty-string, non-empty-string>" at path "key()".');
4141

4242
new StaticClassMapSourceLocator(
4343
['' => __FILE__],

0 commit comments

Comments
 (0)