Skip to content

Commit 923e862

Browse files
authored
Updated InteractsWithModelFactory to handle missing dependencies (#6731)
1 parent 465cbb4 commit 923e862

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Concerns/InteractsWithModelFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
namespace Hyperf\Testing\Concerns;
1414

1515
use Faker\Factory as FakerFactory;
16+
use Hyperf\Database\Model\Factory;
1617
use Hyperf\Testing\ModelFactory;
1718

1819
trait InteractsWithModelFactory
@@ -26,7 +27,7 @@ trait InteractsWithModelFactory
2627

2728
protected function setUpInteractsWithModelFactory()
2829
{
29-
if (! class_exists(FakerFactory::class)) {
30+
if (! class_exists(Factory::class) || ! class_exists(FakerFactory::class)) {
3031
return;
3132
}
3233

0 commit comments

Comments
 (0)