File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
tests/Resources/Contacts/ContactRelations Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 33namespace Bexio \Resources \Contacts \ContactRelations \Requests ;
44
55use Bexio \Resources \Contacts \ContactRelations \ContactRelation ;
6+ use Bexio \Resources \Contacts \Contacts \Contact ;
7+ use Bexio \Resources \Contacts \Contacts \Enums \ContactType ;
68use Bexio \Support \Data \SearchCriteria ;
79use function Pest \Faker \fake ;
810
911$ testRelation = null ;
1012
1113it ('can create a ContactRelation ' , function () use (&$ testRelation ) {
14+ $ connectToContact = new Contact (
15+ contact_type_id: ContactType::PERSON ,
16+ name_1: fake ()->firstName (),
17+ name_2: fake ()->lastName (),
18+ );
19+ $ connectToContact = $ connectToContact ->attachClient (testClient ())->save ();
20+
1221 $ relation = new ContactRelation (
13- contact_id: 1 ,
14- contact_sub_id: 2 ,
22+ contact_id: testContactId () ,
23+ contact_sub_id: $ connectToContact -> id ,
1524 description: fake ()->sentence (),
1625 );
1726
You can’t perform that action at this time.
0 commit comments