Skip to content

Commit 7c3c89d

Browse files
committed
add blackbox 6 support
1 parent 522c10b commit 7c3c89d

File tree

11 files changed

+79
-13
lines changed

11 files changed

+79
-13
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [Unreleased]
4+
5+
### Added
6+
7+
- Support for `innmind/black-box` `6`
8+
39
## 4.3.2 - 2024-10-26
410

511
### Fixed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
}
3333
},
3434
"require-dev": {
35-
"phpunit/phpunit": "~10.2",
35+
"phpunit/phpunit": "~10.2|~11.0|~12.0",
3636
"vimeo/psalm": "~5.26",
37-
"innmind/black-box": "~5.0",
37+
"innmind/black-box": "~5.0|^6.0.1",
3838
"innmind/coding-standard": "~2.0"
3939
},
4040
"conflict": {
41-
"innmind/black-box": "<5.0|~6.0"
41+
"innmind/black-box": "<5.0|~7.0"
4242
},
4343
"suggest": {
4444
"innmind/black-box": "For property based testing"

tests/Fixtures/Authority/UserInformation/PasswordTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ public function testInterface()
2424

2525
foreach ($set->values(Random::default) as $value) {
2626
$this->assertInstanceOf(Set\Value::class, $value);
27-
$this->assertTrue($value->isImmutable());
27+
28+
if (\interface_exists(Set\Implementation::class)) {
29+
$this->assertTrue($value->immutable());
30+
} else {
31+
$this->assertTrue($value->isImmutable());
32+
}
33+
2834
$this->assertInstanceOf(Model::class, $value->unwrap());
2935
}
3036
}

tests/Fixtures/Authority/UserInformation/UserTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ public function testInterface()
2424

2525
foreach ($set->values(Random::default) as $value) {
2626
$this->assertInstanceOf(Set\Value::class, $value);
27-
$this->assertTrue($value->isImmutable());
27+
28+
if (\interface_exists(Set\Implementation::class)) {
29+
$this->assertTrue($value->immutable());
30+
} else {
31+
$this->assertTrue($value->isImmutable());
32+
}
33+
2834
$this->assertInstanceOf(Model::class, $value->unwrap());
2935
}
3036
}

tests/Fixtures/Authority/UserInformationTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ public function testInterface()
2424

2525
foreach ($set->values(Random::default) as $value) {
2626
$this->assertInstanceOf(Set\Value::class, $value);
27-
$this->assertTrue($value->isImmutable());
27+
28+
if (\interface_exists(Set\Implementation::class)) {
29+
$this->assertTrue($value->immutable());
30+
} else {
31+
$this->assertTrue($value->isImmutable());
32+
}
33+
2834
$this->assertInstanceOf(Model::class, $value->unwrap());
2935
}
3036
}

tests/Fixtures/AuthorityTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ public function testInterface()
2424

2525
foreach ($set->values(Random::default) as $value) {
2626
$this->assertInstanceOf(Set\Value::class, $value);
27-
$this->assertTrue($value->isImmutable());
27+
28+
if (\interface_exists(Set\Implementation::class)) {
29+
$this->assertTrue($value->immutable());
30+
} else {
31+
$this->assertTrue($value->isImmutable());
32+
}
33+
2834
$this->assertInstanceOf(Model::class, $value->unwrap());
2935
}
3036
}

tests/Fixtures/FragmentTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ public function testInterface()
2424

2525
foreach ($set->values(Random::default) as $value) {
2626
$this->assertInstanceOf(Set\Value::class, $value);
27-
$this->assertTrue($value->isImmutable());
27+
28+
if (\interface_exists(Set\Implementation::class)) {
29+
$this->assertTrue($value->immutable());
30+
} else {
31+
$this->assertTrue($value->isImmutable());
32+
}
33+
2834
$this->assertInstanceOf(Model::class, $value->unwrap());
2935
}
3036
}

tests/Fixtures/PathTest.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ public function testInterface()
2424

2525
foreach ($set->values(Random::default) as $value) {
2626
$this->assertInstanceOf(Set\Value::class, $value);
27-
$this->assertTrue($value->isImmutable());
27+
28+
if (\interface_exists(Set\Implementation::class)) {
29+
$this->assertTrue($value->immutable());
30+
} else {
31+
$this->assertTrue($value->isImmutable());
32+
}
33+
2834
$this->assertInstanceOf(Model::class, $value->unwrap());
2935
}
3036
}
@@ -40,7 +46,13 @@ public function testDirectories()
4046

4147
foreach ($set->values(Random::default) as $value) {
4248
$this->assertInstanceOf(Set\Value::class, $value);
43-
$this->assertTrue($value->isImmutable());
49+
50+
if (\interface_exists(Set\Implementation::class)) {
51+
$this->assertTrue($value->immutable());
52+
} else {
53+
$this->assertTrue($value->isImmutable());
54+
}
55+
4456
$this->assertInstanceOf(Model::class, $value->unwrap());
4557
$this->assertTrue($value->unwrap()->directory());
4658
}

tests/Fixtures/QueryTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ public function testInterface()
2424

2525
foreach ($set->values(Random::default) as $value) {
2626
$this->assertInstanceOf(Set\Value::class, $value);
27-
$this->assertTrue($value->isImmutable());
27+
28+
if (\interface_exists(Set\Implementation::class)) {
29+
$this->assertTrue($value->immutable());
30+
} else {
31+
$this->assertTrue($value->isImmutable());
32+
}
33+
2834
$this->assertInstanceOf(Model::class, $value->unwrap());
2935
}
3036
}

tests/Fixtures/SchemeTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ public function testInterface()
2424

2525
foreach ($set->values(Random::default) as $value) {
2626
$this->assertInstanceOf(Set\Value::class, $value);
27-
$this->assertTrue($value->isImmutable());
27+
28+
if (\interface_exists(Set\Implementation::class)) {
29+
$this->assertTrue($value->immutable());
30+
} else {
31+
$this->assertTrue($value->isImmutable());
32+
}
33+
2834
$this->assertInstanceOf(Model::class, $value->unwrap());
2935
}
3036
}

0 commit comments

Comments
 (0)