Skip to content

Commit

Permalink
Shift assertion methods
Browse files Browse the repository at this point in the history
PHPUnit 8 specializes several assertion methods:

- sebastianbergmann/phpunit#3368
- sebastianbergmann/phpunit#3422 (comment)
  • Loading branch information
laravel-shift committed Sep 29, 2023
1 parent 87d51a5 commit 392f19e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/Leads/Repository/LeadRepositoryTest.php
Expand Up @@ -45,6 +45,6 @@ public function save_leads_to_leads_table_if_not_duplicate()
->method('leadCreate')
->will($this->returnValue($response->id));
$leadRepository->leadCreate($this->results, 1, 2);
$this->assertInternalType('object', $leadRepository);
$this->assertIsObject($leadRepository);
}
}
6 changes: 3 additions & 3 deletions tests/SendLeadsTest/Unit/SendLeadsUnitTest.php
Expand Up @@ -71,7 +71,7 @@ public function check_if_campaign_should_return_object()
{
$campaignCount = \App\LeadCount::where('campaign_id', $this->results['eiq_campaign_id'])->first();
if (null !== $campaignCount) {
$this->assertInternalType('object', $campaignCount);
$this->assertIsObject($campaignCount);
} else {
$this->assertNull($campaignCount);
}
Expand All @@ -87,7 +87,7 @@ public function check_if_campaign_affiliate_should_return_object()
{
$campaignAffiliateCount = \App\LeadCount::where('campaign_id', $this->results['eiq_campaign_id'])->where('affiliate_id', $this->results['eiq_affiliate_id'])->first();
if (null !== $campaignAffiliateCount) {
$this->assertInternalType('object', $campaignAffiliateCount);
$this->assertIsObject($campaignAffiliateCount);
} else {
$this->assertNull($campaignAffiliateCount);
}
Expand Down Expand Up @@ -199,6 +199,6 @@ private function checkMikeTestHello($className, $method, $param)
->will($this->returnValue($response));
$id = $stub->$method($param);
$this->assertEquals($response->id, $id->id);
$this->assertInternalType('int', $id->id);
$this->assertIsInt($id->id);
}
}

0 comments on commit 392f19e

Please sign in to comment.