Skip to content

Commit

Permalink
Replace deprecated assertObjectNotHasAttribute with ReflectionObject …
Browse files Browse the repository at this point in the history
…to check for 'unmapped' property existence.
  • Loading branch information
pavelvais committed Sep 4, 2024
1 parent 68ff336 commit e7a8a9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/Resource/BaseResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Nyholm\NSA;
use Nyholm\Psr7\Response;
use PHPUnit\Framework\TestCase;
use ReflectionObject;

/**
* @covers \DigitalCz\DigiSign\Resource\BaseResource
Expand Down Expand Up @@ -86,7 +87,7 @@ public function testHydration(): void
self::assertSame('moo', $resource->collection[0]->string);
self::assertInstanceOf(DummyResource::class, $resource->collection[1]);
self::assertSame('baz', $resource->collection[1]->string);
self::assertObjectNotHasAttribute('unmapped', $resource);
self::assertTrue((new ReflectionObject($resource))->hasProperty('unmapped') === false);
self::assertSame('goo', $resource->unmapped);
self::assertSame('#foobar', $resource->self());
self::assertSame(DummyResource::ID, $resource->id());
Expand Down

0 comments on commit e7a8a9b

Please sign in to comment.