diff --git a/tests/Unit/Domain/OrgMng/Org/OrgBuilderTest.php b/tests/Unit/Domain/OrgMng/Org/OrgBuilderTest.php new file mode 100644 index 0000000..1e24169 --- /dev/null +++ b/tests/Unit/Domain/OrgMng/Org/OrgBuilderTest.php @@ -0,0 +1,31 @@ +expectException(BusinessException::class); + $this->expectExceptionMessage('组织名不能为空'); + + $orgDomainDTO = (new OrgDomainDTO()) + ->tenantId(1) + ->superiorId(1) + ->orgTypeCode('foo') + ->name(''); + + /** @var OrgBuilder $orgBuilder */ + $orgBuilder = app(OrgBuilder::class); + + return $orgBuilder + ->orgDomainDTO($orgDomainDTO) + ->build(); + } + +}