Skip to content

Commit 4ed3e88

Browse files
committed
Fix: Add proper namespace to ObjectHydratorTest class for PHPUnit 12 compatibility
1 parent 45a712e commit 4ed3e88

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

test/Tmdb/Tests/Common/ObjectHydratorTest.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
namespace Tmdb\Tests\Common;
4+
5+
use PHPUnit\Framework\Attributes\Test;
36
use PHPUnit\Framework\TestCase;
47
use Tmdb\Common\ObjectHydrator;
58
use Tmdb\Model\AbstractModel;
@@ -17,9 +20,7 @@
1720
*/
1821
class ObjectHydratorTest extends TestCase
1922
{
20-
/**
21-
* @test
22-
*/
23+
#[Test]
2324
public function canHydrateObject()
2425
{
2526
$objectHydrator = new ObjectHydrator();
@@ -32,15 +33,12 @@ public function canHydrateObject()
3233
]
3334
);
3435

35-
$this->assertInstanceOf('TestModel', $subject);
36+
$this->assertInstanceOf(TestModel::class, $subject);
3637
$this->assertEquals(15, $subject->getId());
3738
$this->assertEquals('Michael', $subject->getName());
3839
}
3940

40-
/**
41-
*
42-
* @test
43-
*/
41+
#[Test]
4442
public function callingNonExistingMethodThrowsException()
4543
{
4644
$this->expectException(\Tmdb\Exception\RuntimeException::class);

0 commit comments

Comments
 (0)