. */ namespace App\Tests\Services\InfoProviderSystem\DTOs; use App\Services\InfoProviderSystem\DTOs\PurchaseInfoDTO; use PHPUnit\Framework\TestCase; class PurchaseInfoDTOTest extends TestCase { public function testThrowOnInvalidType(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('The prices array must only contain PriceDTO instances'); new PurchaseInfoDTO('test', 'test', [new \stdClass()]); } }