test nullable pdf params
This commit is contained in:
parent
d59d444952
commit
9126b0e968
2 changed files with 45 additions and 0 deletions
|
|
@ -278,6 +278,28 @@ class ElementControllerTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
public function testShowPdfReturns400WhenFolderIsMissing(): void
|
||||
{
|
||||
$response = $this->controller->showPdf(null, 'baderech.pdf');
|
||||
|
||||
$this->assertEquals(400, $response->getStatusCode());
|
||||
$this->assertSame(
|
||||
['error' => 'folder is required'],
|
||||
json_decode($response->getContent(), true),
|
||||
);
|
||||
}
|
||||
|
||||
public function testShowPdfReturns400WhenFileNameIsMissing(): void
|
||||
{
|
||||
$response = $this->controller->showPdf('short', null);
|
||||
|
||||
$this->assertEquals(400, $response->getStatusCode());
|
||||
$this->assertSame(
|
||||
['error' => 'fileName is required'],
|
||||
json_decode($response->getContent(), true),
|
||||
);
|
||||
}
|
||||
|
||||
public function testUpdateWithIconImageReturnsElementPayload(): void
|
||||
{
|
||||
$set = $this->createSet(1, 'Baderech');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue