29 lines
830 B
PHP
29 lines
830 B
PHP
<?php
|
|
namespace PSC\Library\Calc\Tests\PreCalc;
|
|
|
|
use PSC\Library\Calc\PreCalc\Group as PSCGroup;
|
|
use PSC\Library\Calc\PreCalc\Parser\Group;
|
|
|
|
class ParseGroupTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function testIfCorrectType()
|
|
{
|
|
$parser = new Group(simplexml_load_string(file_get_contents(__DIR__ . '/../TestFiles/PreCalc/group.xml')));
|
|
|
|
$element = $parser->parse();
|
|
|
|
$this->assertInstanceOf(PSCGroup::class, $element);
|
|
}
|
|
|
|
public function testIfCountCorrect()
|
|
{
|
|
$parser = new Group(simplexml_load_string(file_get_contents(__DIR__ . '/../TestFiles/PreCalc/group.xml')));
|
|
|
|
$element = $parser->parse();
|
|
|
|
$this->assertSame(4, count($element->getVariants()));
|
|
$this->assertSame("ohne Lochbohrung", $element->getName());
|
|
}
|
|
|
|
}
|