Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Feb 22, 2022
1 parent 11042d7 commit 2543c3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"phpstan/phpstan": "^1.0",
"phpunit/phpunit": "^8 || ^9",
"squizlabs/php_codesniffer": "^3.4",
"symfony/polyfill-uuid": "^1.24"
"symfony/polyfill-uuid": "^1.24",
"symfony/string": "^6.0"
},
"config": {
"sort-packages": true
Expand Down
6 changes: 4 additions & 2 deletions tests/DbTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use RuntimeException;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\String\UnicodeString;
use UnexpectedValueException;

/**
Expand Down Expand Up @@ -340,8 +341,9 @@ private function generate(bool $deleteSchema = true): bool
sleep(1);
}

// must be unique
$number = date('YmdHisu') . '_' . ++static::$counter . '_' . uuid_create();
// must be unique and camel-case
$number = date('YmdHisu') . '_' . ++static::$counter . '_' .
(new UnicodeString(uuid_create()))->camel()->toString();

// generate
$application = new Application();
Expand Down

0 comments on commit 2543c3d

Please sign in to comment.