forked from spipu/html2pdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathButtonTest.php
More file actions
36 lines (30 loc) · 788 Bytes
/
ButtonTest.php
File metadata and controls
36 lines (30 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace Tests\Tag\Html;
use PHPUnit\Framework\TestCase;
use Spipu\Html2Pdf\Html2Pdf;
use Spipu\Html2Pdf\Tag\Html\Button;
class ButtonTest extends TestCase
{
private $html2pdf;
private $button;
protected function setUp(): void
{
$this->html2pdf = new Html2Pdf();
$this->button = new Button();
}
public function testButtonName()
{
$this->assertEquals('button', $this->button->getName());
}
public function testButtonProperties()
{
$properties = [
'type' => 'submit',
'class' => 'btn-primary',
'background' => '#007bff',
'color' => '#ffffff'
];
$result = $this->button->open($properties);
$this->assertTrue($result);
}
}