Hi,
I'm writing a PHPUnit test for code using Google Ads API Library.
"googleads/google-ads-php": "^10.0
"google/protobuf": "^3.17"
"phpunit/phpunit": "^8.5"
php version: 7.4
While trying to mock GoogleAdsRow::class I'm getting an error.
EG:
<?php
namespace GoogleAds;
use Google\Ads\GoogleAds\V8\Services\GoogleAdsRow;
use PHPUnit\Framework\TestCase;
class GoogleAdsBugTest extends TestCase
{
public function testBug(): void
{
$googleAdsRow = $this->createMock(GoogleAdsRow::class);
}
}
I've also tried building as:
$googleAdsRow = new GoogleAdsRow();
$googleAdsRow->setAdGroup($adGroup);
$googleAdsRow->setMetrics($metrics);
$googleAdsRow->setSegments($segments);
But is also resolves as an error.
Are you aware of this issue? Is there a way to work around it?
Let me know if you need any more details.
Best,
Andjel