Skip to content

Commit

Permalink
Fix placeholder test (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardocavazza committed Nov 5, 2024
1 parent 8422716 commit cbbd516
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/TestCase/View/Helper/PlaceholdersHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function setUp(): void
$this->object = new ObjectEntity([
'id' => 1,
'type' => 'objects',
'body' => '<p>Hello World <!-- BE-PLACEHOLDER.2 --></p><!-- BE-PLACEHOLDER.3.eyJjbGFzcyI6InRlc3QifQ -->',
'body' => '<p>Hello World <!-- BE-PLACEHOLDER.2 --></p><!-- BE-PLACEHOLDER.3.eyJjbGFzcyI6InRlc3QifQ== -->',
'placeholder' => [$this->image1, $this->image2],
]);
}
Expand Down Expand Up @@ -153,7 +153,7 @@ public function testGetTemplate()
public function testDefaultTemplater()
{
$contents = $this->Placeholders::defaultTemplater($this->object, 'body', [$this->image1, $this->image2], fn ($entity, $params) => sprintf('%s %s', $entity->title, $params ? json_encode($params) : ''));
$this->assertSame('<p>Hello World image1 </p>image2 {"class":"test"}', $contents);
$this->assertSame('<p>Hello World image1 </p>image2 "{\"class\":\"test\"}"', $contents);
}

/**
Expand Down

0 comments on commit cbbd516

Please sign in to comment.