update downstream tests for text user requirement
Text now requires a User on construction. seed a user in each test setUp that creates a Text directly or through the fake repository so the suite remains green.
This commit is contained in:
parent
40fdf25da2
commit
cbbbc80326
9 changed files with 71 additions and 22 deletions
|
|
@ -37,7 +37,7 @@ class CreatePlanTest extends TestCase
|
|||
$this->textRepo = new FakeTextRepository();
|
||||
$this->nodeRepo = new FakeNodeRepository();
|
||||
$this->scheduledNodeRepo = new FakeScheduledNodeRepository();
|
||||
$this->userRepo->create(new CreateUserDto(
|
||||
$user = $this->userRepo->create(new CreateUserDto(
|
||||
email: new EmailAddress('test@test.com'),
|
||||
passwordHash: '',
|
||||
isAdmin: false,
|
||||
|
|
@ -47,7 +47,10 @@ class CreatePlanTest extends TestCase
|
|||
planRepo: $this->planRepo,
|
||||
nodeRepo: $this->nodeRepo,
|
||||
);
|
||||
$this->textRepo->create(new CreateTextDto('testname'));
|
||||
$this->textRepo->create(new CreateTextDto(
|
||||
name: 'testname',
|
||||
user: $user,
|
||||
));
|
||||
$this->useCase = new CreatePlan(
|
||||
$this->planRepo,
|
||||
$this->userRepo,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue