| Conditions | 3 |
| Paths | 3 |
| Total Lines | 23 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function testArrayization(): void |
||
| 29 | { |
||
| 30 | /** @psalm-var class-string|null */ |
||
| 31 | $testedClass = $this->testedClass; |
||
| 32 | |||
| 33 | /** @psalm-var array|null */ |
||
| 34 | $arrayRepresentation = $this->arrayRepresentation; |
||
| 35 | |||
| 36 | |||
| 37 | if (!class_exists($this->testedClass)) { |
||
| 38 | $this->markTestSkipped( |
||
| 39 | 'Unable to run ' . self::class . '::testArrayization(). Please set ' . self::class |
||
| 40 | . ':$element to a class-string representing the XML-class being tested', |
||
| 41 | ); |
||
| 42 | } elseif ($this->arrayRepresentation === null) { |
||
| 43 | $this->markTestSkipped( |
||
| 44 | 'Unable to run ' . self::class . '::testArrayization(). Please set ' . self::class |
||
| 45 | . ':$arrayRepresentation to an array representing the XML-class being tested', |
||
| 46 | ); |
||
| 47 | } else { |
||
| 48 | $this->assertEquals( |
||
| 49 | $this->arrayRepresentation, |
||
| 50 | $this->testedClass::fromArray($this->arrayRepresentation)->toArray(), |
||
| 51 | ); |
||
| 55 |