1 | <?php |
||
2 | class DataTypeTest extends \PHPUnit\Framework\TestCase |
||
3 | { |
||
4 | protected function setUp(): void |
||
5 | { |
||
6 | $this->datatype = new DataType(); |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
7 | } |
||
8 | |||
9 | /** |
||
10 | * testTooManyAttributes |
||
11 | * |
||
12 | * @expectedException BuildException |
||
13 | * @expectedExceptionMessage You must not specify more than one attribute when using refid |
||
14 | */ |
||
15 | public function testTooManyAttributes() |
||
16 | { |
||
17 | $ex = $this->datatype->tooManyAttributes(); |
||
18 | throw $ex; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * testNoChildrenAllowedException |
||
23 | * |
||
24 | * @expectedException BuildException |
||
25 | * @expectedExceptionMessage You must not specify nested elements when using refid |
||
26 | */ |
||
27 | public function testNoChildrenAllowedException() |
||
28 | { |
||
29 | $ex = $this->datatype->noChildrenAllowed(); |
||
30 | throw $ex; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * testCircularReferenceException |
||
35 | * |
||
36 | * @expectedException BuildException |
||
37 | * @expectedExceptionMessage This data type contains a circular reference. |
||
38 | */ |
||
39 | public function testCircularReferenceException() |
||
40 | { |
||
41 | $ex = $this->datatype->circularReference(); |
||
42 | throw $ex; |
||
43 | } |
||
44 | |||
45 | public function testToString() |
||
46 | { |
||
47 | $str = ""; |
||
48 | $str .= $this->datatype; |
||
49 | $this->assertEquals("DataType", $str); |
||
50 | } |
||
51 | } |
||
52 |