Skip to content

Commit b49ede0

Browse files
committed
Update test namespaces to align with Abstract\Primitive structure and fix resource handling in PrimitiveTypeTest.
1 parent 40630ac commit b49ede0

File tree

6 files changed

+5
-1
lines changed

6 files changed

+5
-1
lines changed

tests/Unit/Abstract/DateTime/DateTimeTypeTest.php renamed to tests/Unit/Abstract/Primitive/DateTime/DateTimeTypeTest.php

File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/Unit/Abstract/PrimitiveTypeTest.php renamed to tests/Unit/Abstract/Primitive/PrimitiveTypeTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
declare(strict_types=1);
44

5+
namespace Abstract\Primitive;
6+
57
use PhpTypedValues\Abstract\Primitive\PrimitiveType;
68
use PhpTypedValues\Exception\TypeException;
79

10+
use function is_resource;
11+
812
abstract readonly class PrimitiveTypeTest extends PrimitiveType
913
{
1014
public static function convert(mixed $value): string
@@ -48,6 +52,6 @@ public function __toString(): string
4852
expect(fn() => PrimitiveTypeTest::convert($res))
4953
->toThrow(TypeException::class, 'Value cannot be cast to string');
5054
} finally {
51-
\is_resource($res) && fclose($res);
55+
is_resource($res) && fclose($res);
5256
}
5357
});
File renamed without changes.

tests/Unit/Abstract/Undefined/UndefinedTypeTest.php renamed to tests/Unit/Abstract/Primitive/Undefined/UndefinedTypeTest.php

File renamed without changes.

0 commit comments

Comments
 (0)