Skip to content

Commit 4c0f188

Browse files
committed
Updated deprecated functions for PHPUnit 10
1 parent 23c4db8 commit 4c0f188

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

tests/Api/ApigeeX/Controller/AcceptedRatePlanControllerTestBase.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public function testAcceptRatePlan(): void
7171
$acceptedRatePlan = $acceptedController->acceptRatePlan($ratePlan);
7272
$payload = json_decode((string) static::mockApiClient()->getJournal()->getLastRequest()->getBody());
7373
// Make sure we do not send properties with null values.
74-
$this->assertObjectNotHasAttribute('endTime', $payload);
75-
$this->assertObjectNotHasAttribute('startTime', $payload);
74+
$this->assertObjectNotHasProperty('endTime', $payload);
75+
$this->assertObjectNotHasProperty('startTime', $payload);
7676

7777
// Make sure the properties copied from the response to the created
7878
// object.

tests/Api/Monetization/Controller/AcceptedRatePlanControllerTestBase.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ public function testAcceptRatePlan(): void
7373
$acceptedRatePlan = $acceptedController->acceptRatePlan($ratePlan, $startDate);
7474
$payload = json_decode((string) static::mockApiClient()->getJournal()->getLastRequest()->getBody());
7575
// Make sure we do not send properties with null values.
76-
$this->assertObjectNotHasAttribute('endDate', $payload);
77-
$this->assertObjectNotHasAttribute('quotaTarget', $payload);
78-
$this->assertObjectNotHasAttribute('suppressWarning', $payload);
79-
$this->assertObjectNotHasAttribute('waveTerminationCharge', $payload);
76+
$this->assertObjectNotHasProperty('endDate', $payload);
77+
$this->assertObjectNotHasProperty('quotaTarget', $payload);
78+
$this->assertObjectNotHasProperty('suppressWarning', $payload);
79+
$this->assertObjectNotHasProperty('waveTerminationCharge', $payload);
8080
// Make sure the properties copied from the response to the created
8181
// object.
8282
$this->assertNotNull($acceptedRatePlan->id());
@@ -115,8 +115,8 @@ public function testUpdateSubscription(): void
115115
$acceptedController->updateSubscription($acceptedRatePlan);
116116
$payload = json_decode((string) static::mockApiClient()->getJournal()->getLastRequest()->getBody());
117117
// Make sure we do not send properties with null values.
118-
$this->assertObjectNotHasAttribute('suppressWarning', $payload);
119-
$this->assertObjectNotHasAttribute('waveTerminationCharge', $payload);
118+
$this->assertObjectNotHasProperty('suppressWarning', $payload);
119+
$this->assertObjectNotHasProperty('waveTerminationCharge', $payload);
120120
// Make sure response values override values in the original object.
121121
$this->assertEquals($originalStartDate, $acceptedRatePlan->getStartDate());
122122

tests/Serializer/EntitySerializerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function testNormalize()
101101
$this->assertEquals(-1, $normalized->appCredential[0]->expiresAt);
102102
$this->assertEquals('foo', $normalized->appCredential[0]->apiProducts[0]->apiproduct);
103103
$this->assertEquals('foo', $normalized->appCredential[0]->attributes[0]->name);
104-
$this->assertObjectNotHasAttribute('date', $normalized);
104+
$this->assertObjectNotHasProperty('date', $normalized);
105105
$date = new DateTimeImmutable();
106106
$entity->setDate($date);
107107
$normalized = static::$serializer->normalize($entity);

tests/Structure/PropertiesPropertyTransformationTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testNormalize()
6060
$object = new PropertiesProperty(['features.isCpsEnabled' => 'true']);
6161
$this->assertEquals('true', $object->getValue('features.isCpsEnabled'));
6262
$normalized = static::$normalizer->normalize($object);
63-
$this->assertObjectHasAttribute('property', $normalized);
63+
$this->assertObjectHasProperty('property', $normalized);
6464
$this->assertArrayHasKey(0, $normalized->property);
6565
$this->assertEquals('features.isCpsEnabled', $normalized->property[0]->name);
6666
$this->assertEquals('true', $normalized->property[0]->value);

0 commit comments

Comments
 (0)