add unit tests

This commit is contained in:
Dennis Eichhorn 2021-11-02 21:57:09 +01:00
parent baf370fbc8
commit 672273e43d
4 changed files with 2 additions and 25 deletions

View File

@ -290,7 +290,7 @@ class Client
/**
* Get all media files by type
*
* @param int $type Media type
* @param null|int $type Media type
*
* @return Media[]
*

View File

@ -56,7 +56,6 @@ trait ApiControllerClientTrait
$request->setData('country', ISO3166TwoEnum::_USA);
$this->module->apiClientCreate($request, $response);
self::assertGreaterThan(0, $response->get('')['response']->getId());
}

View File

@ -49,26 +49,4 @@ final class ClientMapperTest extends \PHPUnit\Framework\TestCase
self::assertGreaterThan(0, $client->getId());
self::assertEquals($id, $client->getId());
}
/**
* @group volume
* @group module
* @coversNothing
*/
public function testClientVolume() : void
{
$profile = ProfileMapper::getFor(1, 'account');
$profile = $profile instanceof NullProfile ? new Profile() : $profile;
if ($profile->account->getId() === 0) {
$profile->account = new NullAccount(1);
}
for ($i = 0; $i < 100; ++$i) {
$client = new Client();
$client->number = (string) \mt_rand(100000, 999999);
$client->profile = $profile;
ClientMapper::create($client);
}
}
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="Bootstrap.php" colors="true" stopOnError="true" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="Bootstrap.php" colors="true" columns="120" stopOnError="true" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage includeUncoveredFiles="true" processUncoveredFiles="false">
<exclude>
<directory>*vendor*</directory>