-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCodeInsertionTest.php
More file actions
23 lines (19 loc) · 655 Bytes
/
CodeInsertionTest.php
File metadata and controls
23 lines (19 loc) · 655 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
namespace PhpSchool\PhpWorkshopTest;
use PhpSchool\PhpWorkshop\CodeInsertion;
use PhpSchool\PhpWorkshop\Exception\InvalidArgumentException;
use PHPUnit\Framework\TestCase;
class CodeInsertionTest extends TestCase
{
public function testInvalidType(): void
{
$this->expectException(InvalidArgumentException::class);
new CodeInsertion('notatype', '');
}
public function testGetters(): void
{
$mod = new CodeInsertion(CodeInsertion::TYPE_BEFORE, '<?php codez');
$this->assertEquals(CodeInsertion::TYPE_BEFORE, $mod->getType());
$this->assertEquals('<?php codez', $mod->getCode());
}
}