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
|
|
@ -35,19 +35,20 @@ class CreateScheduledNodeTest extends TestCase
|
|||
$this->scheduledNodeRepo = new FakeScheduledNodeRepository();
|
||||
$this->planRepo = new FakePlanRepository();
|
||||
$this->nodeRepo = new FakeNodeRepository();
|
||||
$user = new User(
|
||||
id: 0,
|
||||
email: new EmailAddress('test@test.com'),
|
||||
passwordHash: 'hashed:password1',
|
||||
isAdmin: false,
|
||||
);
|
||||
$this->nodeRepo->create(new CreateNodeDto(
|
||||
text: new Text(0, 'text name'),
|
||||
text: new Text(0, 'text name', $user),
|
||||
title: 'test node',
|
||||
parentNode: null,
|
||||
));
|
||||
$this->planRepo->create(new CreatePlanDto(
|
||||
name: 'testplan',
|
||||
user: new User(
|
||||
id: 0,
|
||||
email: new EmailAddress('test@test.com'),
|
||||
passwordHash: 'hashed:password1',
|
||||
isAdmin: false,
|
||||
),
|
||||
user: $user,
|
||||
));
|
||||
$this->useCase = new CreateScheduledNode(
|
||||
$this->scheduledNodeRepo,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue