ldc-crm/tests/StressTest/LoginStressTest.php

20 lines
482 B
PHP

<?php
namespace Tests\Unit;
use LDC\LDCCRM\CrmApiV2;
use LDC\LDCCRM\Models\Customer;
class LoginStressTest extends CrmClientTester
{
public function testCustomerLogin()
{
$api = new CrmApiV2();
$customer = $api->getCustomerOrNew(static::$info->hashcode);
for ($i = 0; $i < 3; $i++) {
$loginOK = Customer::login($customer->email, 'testPassword');
$this->assertTrue($loginOK, 'Should have loggedin');
}
}
}