fixes
This commit is contained in:
parent
ef25403e42
commit
746c9d86e5
File diff suppressed because one or more lines are too long
@ -488,9 +488,9 @@ class Engine
|
|||||||
/**
|
/**
|
||||||
* @return Article
|
* @return Article
|
||||||
*/
|
*/
|
||||||
public function getArticle()
|
public function getArticle($shouldCalc = true)
|
||||||
{
|
{
|
||||||
if($this->dirty) {
|
if($this->dirty && $shouldCalc) {
|
||||||
$this->calc();
|
$this->calc();
|
||||||
}
|
}
|
||||||
return $this->article;
|
return $this->article;
|
||||||
@ -670,10 +670,10 @@ class Engine
|
|||||||
{
|
{
|
||||||
|
|
||||||
$tmp = ['artikel' => array_merge([
|
$tmp = ['artikel' => array_merge([
|
||||||
'name' => $this->getArticle()->getName(),
|
'name' => $this->getArticleByName()->getName(),
|
||||||
'uuid' => $this->getArticle()->getUUID(),
|
'uuid' => $this->getArticleByName()->getUUID(),
|
||||||
'kommentar' => ''
|
'kommentar' => ''
|
||||||
], $this->getArticle()->generateXML())];
|
], $this->getArticleByName()->generateXML())];
|
||||||
|
|
||||||
return ArrayToXml::convert($tmp, 'kalkulation');
|
return ArrayToXml::convert($tmp, 'kalkulation');
|
||||||
}
|
}
|
||||||
@ -682,9 +682,9 @@ class Engine
|
|||||||
{
|
{
|
||||||
|
|
||||||
$obj = new \stdClass();
|
$obj = new \stdClass();
|
||||||
$obj->uuid = $this->getArticle()->getUUID();
|
$obj->uuid = $this->getArticleByName(false)->getUUID();
|
||||||
$obj->name = $this->getArticle()->getName();
|
$obj->name = $this->getArticleByName(false)->getName();
|
||||||
$obj->options = $this->getArticle()->generateJson();
|
$obj->options = $this->getArticleByName(false)->generateJson();
|
||||||
|
|
||||||
return json_encode([$obj]);
|
return json_encode([$obj]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,8 +37,45 @@ class Edge
|
|||||||
if (isset($this->json['calcValue'])) {
|
if (isset($this->json['calcValue'])) {
|
||||||
$edge->setCalcValue((string)$this->json['calcValue']);
|
$edge->setCalcValue((string)$this->json['calcValue']);
|
||||||
}
|
}
|
||||||
|
if (isset($this->json['calcValue1'])) {
|
||||||
|
$edge->setCalcValue1((string)$this->json['calcValue1']);
|
||||||
|
}
|
||||||
|
if (isset($this->json['calcValue2'])) {
|
||||||
|
$edge->setCalcValue2((string)$this->json['calcValue2']);
|
||||||
|
}
|
||||||
|
if (isset($this->json['calcValue3'])) {
|
||||||
|
$edge->setCalcValue3((string)$this->json['calcValue3']);
|
||||||
|
}
|
||||||
|
if (isset($this->json['calcValue4'])) {
|
||||||
|
$edge->setCalcValue4((string)$this->json['calcValue4']);
|
||||||
|
}
|
||||||
|
if (isset($this->json['calcValue5'])) {
|
||||||
|
$edge->setCalcValue5((string)$this->json['calcValue5']);
|
||||||
|
}
|
||||||
|
if (isset($this->json['calcValue6'])) {
|
||||||
|
$edge->setCalcValue6((string)$this->json['calcValue6']);
|
||||||
|
}
|
||||||
|
if (isset($this->json['calcValue7'])) {
|
||||||
|
$edge->setCalcValue7((string)$this->json['calcValue7']);
|
||||||
|
}
|
||||||
|
if (isset($this->json['calcValue8'])) {
|
||||||
|
$edge->setCalcValue8((string)$this->json['calcValue8']);
|
||||||
|
}
|
||||||
|
if (isset($this->json['calcValue9'])) {
|
||||||
|
$edge->setCalcValue9((string)$this->json['calcValue9']);
|
||||||
|
}
|
||||||
|
if (isset($this->json['calcValue10'])) {
|
||||||
|
$edge->setCalcValue10((string)$this->json['calcValue10']);
|
||||||
|
}
|
||||||
|
if (isset($this->json['flatRate']) && $this->json['flatRate'] != "") {
|
||||||
|
$edge->setPauschale((float)$this->json['flatRate']);
|
||||||
|
}
|
||||||
|
if (isset($this->json['price']) && $this->json['price'] != "") {
|
||||||
|
$edge->setPreis((float)$this->json['price']);
|
||||||
|
}
|
||||||
|
|
||||||
$this->parseCondition($edge, trim($this->json['value']));
|
$this->parseCondition($edge, trim($this->json['value']));
|
||||||
|
|
||||||
if (isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) {
|
if (isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) {
|
||||||
$edgeCollectionContainerParser = new EdgeCollectionContainer();
|
$edgeCollectionContainerParser = new EdgeCollectionContainer();
|
||||||
$edgeCollectionContainerParser->fromJson($this->json['dependencys']);
|
$edgeCollectionContainerParser->fromJson($this->json['dependencys']);
|
||||||
|
|||||||
@ -394,15 +394,47 @@ class Edge
|
|||||||
if($this->pauschale != 0) {
|
if($this->pauschale != 0) {
|
||||||
$tmp['pauschale'] = $this->pauschale;
|
$tmp['pauschale'] = $this->pauschale;
|
||||||
}
|
}
|
||||||
|
if($this->preis != 0) {
|
||||||
|
$tmp['preis'] = $this->preis;
|
||||||
|
}
|
||||||
if($this->calcValue != "") {
|
if($this->calcValue != "") {
|
||||||
$tmp['calc_value'] = $this->calcValue;
|
$tmp['calc_value'] = $this->calcValue;
|
||||||
}
|
}
|
||||||
|
if($this->calcValue1 != "") {
|
||||||
|
$tmp['calc_value_1'] = $this->calcValue1;
|
||||||
|
}
|
||||||
|
if($this->calcValue2 != "") {
|
||||||
|
$tmp['calc_value_2'] = $this->calcValue2;
|
||||||
|
}
|
||||||
|
if($this->calcValue3 != "") {
|
||||||
|
$tmp['calc_value_3'] = $this->calcValue3;
|
||||||
|
}
|
||||||
|
if($this->calcValue4 != "") {
|
||||||
|
$tmp['calc_value_4'] = $this->calcValue4;
|
||||||
|
}
|
||||||
|
if($this->calcValue5 != "") {
|
||||||
|
$tmp['calc_value_5'] = $this->calcValue5;
|
||||||
|
}
|
||||||
|
if($this->calcValue6 != "") {
|
||||||
|
$tmp['calc_value_6'] = $this->calcValue6;
|
||||||
|
}
|
||||||
|
if($this->calcValue7 != "") {
|
||||||
|
$tmp['calc_value_7'] = $this->calcValue7;
|
||||||
|
}
|
||||||
|
if($this->calcValue8 != "") {
|
||||||
|
$tmp['calc_value_8'] = $this->calcValue8;
|
||||||
|
}
|
||||||
|
if($this->calcValue9 != "") {
|
||||||
|
$tmp['calc_value_9'] = $this->calcValue9;
|
||||||
|
}
|
||||||
|
if($this->calcValue10 != "") {
|
||||||
|
$tmp['calc_value_10'] = $this->calcValue10;
|
||||||
|
}
|
||||||
|
|
||||||
if($this->edgesCollectionContainer->count() > 0) {
|
if($this->edgesCollectionContainer->count() > 0) {
|
||||||
$tmp = [
|
$tmp = [
|
||||||
'_attributes' => array_merge([
|
'_attributes' => array_merge([
|
||||||
'value' => $this->from . '-' . ($this->to != 0 ? $this->to : '')
|
'value' => $this->generateXMLValue()
|
||||||
], $tmp),
|
], $tmp),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -415,17 +447,41 @@ class Edge
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
'_attributes' => $tmp,
|
'_attributes' => $tmp,
|
||||||
'_value' => $this->from . '-' . ($this->to != 0 ? $this->to : '')
|
'_value' => $this->generateXMLValue()
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function generateXMLValue(): string
|
||||||
|
{
|
||||||
|
if($this->region) {
|
||||||
|
return $this->from . '-' . ($this->to != 0 ? $this->to : '');
|
||||||
|
}elseif(is_array($this->values) && count($this->values) > 1) {
|
||||||
|
return implode(",", $this->values);
|
||||||
|
}elseif(is_array($this->values) && count($this->values) == 1){
|
||||||
|
return $this->values[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
public function generateJson(): object
|
public function generateJson(): object
|
||||||
{
|
{
|
||||||
$obj = new \stdClass();
|
$obj = new \stdClass();
|
||||||
$obj->calcValue = $this->calcValue;
|
$obj->calcValue = $this->calcValue;
|
||||||
|
$obj->calcValue1 = $this->calcValue1;
|
||||||
|
$obj->calcValue2 = $this->calcValue2;
|
||||||
|
$obj->calcValue3 = $this->calcValue3;
|
||||||
|
$obj->calcValue4 = $this->calcValue4;
|
||||||
|
$obj->calcValue5 = $this->calcValue5;
|
||||||
|
$obj->calcValue6 = $this->calcValue6;
|
||||||
|
$obj->calcValue7 = $this->calcValue7;
|
||||||
|
$obj->calcValue8 = $this->calcValue8;
|
||||||
|
$obj->calcValue9 = $this->calcValue9;
|
||||||
|
$obj->calcValue10 = $this->calcValue10;
|
||||||
$obj->flatRate = $this->pauschale!=0 ? $this->pauschale : "";
|
$obj->flatRate = $this->pauschale!=0 ? $this->pauschale : "";
|
||||||
$obj->formula = $this->formel;
|
$obj->formula = $this->formel;
|
||||||
|
$obj->price = $this->preis;
|
||||||
if($this->region) {
|
if($this->region) {
|
||||||
$obj->value = $this->from . '-' . ($this->to != 0 ? $this->to : '');
|
$obj->value = $this->from . '-' . ($this->to != 0 ? $this->to : '');
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -66,6 +66,12 @@ class EdgeCollection extends \ArrayIterator
|
|||||||
return $xml_options;
|
return $xml_options;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
if($this->formel != "") {
|
||||||
|
$tmp = array_merge_recursive($tmp, ['_attributes' => [
|
||||||
|
'formel' => $this->formel
|
||||||
|
]]);
|
||||||
|
}
|
||||||
|
|
||||||
return $tmp;
|
return $tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class Parser
|
|||||||
$obj = new Input();
|
$obj = new Input();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$obj = new Select();
|
$obj = new Select($mode);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
$obj = new Text();
|
$obj = new Text();
|
||||||
|
|||||||
@ -48,6 +48,12 @@ class Base
|
|||||||
if(isset($this->json['required'])) {
|
if(isset($this->json['required'])) {
|
||||||
$this->element->setRequire($this->json['required']);
|
$this->element->setRequire($this->json['required']);
|
||||||
}
|
}
|
||||||
|
if(isset($this->json['exportAjax'])) {
|
||||||
|
$this->element->setIsAjaxExport($this->json['exportAjax']);
|
||||||
|
}
|
||||||
|
if(isset($this->json['displayOnly'])) {
|
||||||
|
$this->element->setIsDisplayOnly($this->json['displayOnly']);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->element;
|
return $this->element;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,6 +17,26 @@ class Checkbox extends Base
|
|||||||
$this->element = new \PSC\Library\Calc\Option\Type\Checkbox();
|
$this->element = new \PSC\Library\Calc\Option\Type\Checkbox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function parseJson(): PSCCheckbox
|
||||||
|
{
|
||||||
|
parent::parseJson();
|
||||||
|
|
||||||
|
if(isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) {
|
||||||
|
$edgeCollectionContainerParser = new EdgeCollectionContainer();
|
||||||
|
$edgeCollectionContainerParser->fromJson($this->json['dependencys']);
|
||||||
|
$this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($this->json['options'] as $opt) {
|
||||||
|
$optParser = new Opt();
|
||||||
|
$optParser->fromJson($opt);
|
||||||
|
$this->element->addOption($optParser->parseJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->element;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function parseXML(): PSCCheckbox
|
public function parseXML(): PSCCheckbox
|
||||||
{
|
{
|
||||||
parent::parseXML();
|
parent::parseXML();
|
||||||
@ -35,8 +55,9 @@ class Checkbox extends Base
|
|||||||
private function parseModeNormal()
|
private function parseModeNormal()
|
||||||
{
|
{
|
||||||
foreach ($this->node->opt as $opt) {
|
foreach ($this->node->opt as $opt) {
|
||||||
$optParser = new Opt($opt);
|
$optParser = new Opt();
|
||||||
$this->element->addOption($optParser->parse());
|
$optParser->fromXML($opt);
|
||||||
|
$this->element->addOption($optParser->parseXML());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,14 +8,40 @@ class Opt
|
|||||||
{
|
{
|
||||||
protected $element;
|
protected $element;
|
||||||
private \SimpleXMLElement $node;
|
private \SimpleXMLElement $node;
|
||||||
|
private array $json;
|
||||||
|
|
||||||
public function __construct(\SimpleXMLElement $node)
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->element = new \PSC\Library\Calc\Option\Type\Checkbox\Opt();
|
$this->element = new \PSC\Library\Calc\Option\Type\Checkbox\Opt();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fromJson(array $json): void
|
||||||
|
{
|
||||||
|
$this->json = $json;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fromXML(\SimpleXMLElement $node): void
|
||||||
|
{
|
||||||
$this->node = $node;
|
$this->node = $node;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function parse()
|
public function parseJson()
|
||||||
|
{
|
||||||
|
$this->element->setId((string)$this->json['id']);
|
||||||
|
$this->element->setLabel((string)$this->json['name']);
|
||||||
|
|
||||||
|
if(isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) {
|
||||||
|
$edgeCollectionContainerParser = new EdgeCollectionContainer();
|
||||||
|
$edgeCollectionContainerParser->fromJson($this->json['dependencys']);
|
||||||
|
$this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->element;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function parseXML()
|
||||||
{
|
{
|
||||||
$this->element->setId((string)$this->node['id']);
|
$this->element->setId((string)$this->node['id']);
|
||||||
$this->element->setLabel((string)$this->node['name']);
|
$this->element->setLabel((string)$this->node['name']);
|
||||||
|
|||||||
@ -19,7 +19,13 @@ class Input extends Base
|
|||||||
if(isset($this->json['placeHolder'])) {
|
if(isset($this->json['placeHolder'])) {
|
||||||
$this->element->setPlaceHolder((string)$this->json['placeHolder']);
|
$this->element->setPlaceHolder((string)$this->json['placeHolder']);
|
||||||
}
|
}
|
||||||
|
if(isset($this->json['minValue'])) {
|
||||||
|
$this->element->setMinValue((int)$this->json['minValue']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($this->json['maxValue'])) {
|
||||||
|
$this->element->setMaxValue((int)$this->json['maxValue']);
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) {
|
if(isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) {
|
||||||
$edgeCollectionContainerParser = new EdgeCollectionContainer();
|
$edgeCollectionContainerParser = new EdgeCollectionContainer();
|
||||||
|
|||||||
@ -135,10 +135,18 @@ class Select extends Base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function parseModePapierDbJson()
|
||||||
|
{
|
||||||
|
$this->element->setContainer((string)$this->json['container']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private function parseModeColorDbXML(): void
|
private function parseModeColorDbXML(): void
|
||||||
{
|
{
|
||||||
$colorSystem = (string)$this->node['container'];
|
$colorSystem = (string)$this->node['container'];
|
||||||
|
|
||||||
|
$this->element->setContainer($colorSystem);
|
||||||
|
|
||||||
$value = $this->cache->get($colorSystem, function (ItemInterface $item) use ($colorSystem): array {
|
$value = $this->cache->get($colorSystem, function (ItemInterface $item) use ($colorSystem): array {
|
||||||
$item->expiresAfter(3600);
|
$item->expiresAfter(3600);
|
||||||
|
|
||||||
@ -175,6 +183,11 @@ class Select extends Base
|
|||||||
$this->element->addOptions($value);
|
$this->element->addOptions($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function parseModeColorDbJson(): void
|
||||||
|
{
|
||||||
|
$this->element->setContainer((string)$this->json['container']);
|
||||||
|
}
|
||||||
|
|
||||||
private function parseModeNormalXML()
|
private function parseModeNormalXML()
|
||||||
{
|
{
|
||||||
foreach ($this->node->opt as $opt) {
|
foreach ($this->node->opt as $opt) {
|
||||||
|
|||||||
@ -345,8 +345,16 @@ class Base
|
|||||||
$obj = new \stdClass();
|
$obj = new \stdClass();
|
||||||
$obj->id = $this->getId();
|
$obj->id = $this->getId();
|
||||||
$obj->name = $this->getName();
|
$obj->name = $this->getName();
|
||||||
$obj->default = $this->getDefault()?? "";
|
if($this->default !== null) {
|
||||||
|
$obj->default = $this->default;
|
||||||
|
}
|
||||||
$obj->dependencys = [];
|
$obj->dependencys = [];
|
||||||
|
if($this->isAjaxExport()) {
|
||||||
|
$obj->exportAjax = $this->isAjaxExport();
|
||||||
|
}
|
||||||
|
if($this->isDisplayOnly()) {
|
||||||
|
$obj->displayOnly = $this->isDisplayOnly();
|
||||||
|
}
|
||||||
|
|
||||||
foreach($this->edgesCollectionContainer as $col) {
|
foreach($this->edgesCollectionContainer as $col) {
|
||||||
$obj->dependencys[] = $col->generateJson();
|
$obj->dependencys[] = $col->generateJson();
|
||||||
@ -360,11 +368,24 @@ class Base
|
|||||||
$tmp = [
|
$tmp = [
|
||||||
'_attributes' => [
|
'_attributes' => [
|
||||||
'id' => $this->getId(),
|
'id' => $this->getId(),
|
||||||
'name' => $this->getName(),
|
|
||||||
'type' => ucfirst($this->getType()),
|
'type' => ucfirst($this->getType()),
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
if($this->name != "") {
|
||||||
|
$tmp = array_merge_recursive($tmp, ['_attributes' => [
|
||||||
|
'name' => $this->name
|
||||||
|
]]);
|
||||||
|
}
|
||||||
|
if($this->isDisplayOnly()) {
|
||||||
|
$tmp = array_merge_recursive($tmp, ['_attributes' => [
|
||||||
|
'displayOnly' => $this->isDisplayOnly()?'1':'0'
|
||||||
|
]]);
|
||||||
|
}
|
||||||
|
if($this->isAjaxExport()) {
|
||||||
|
$tmp = array_merge_recursive($tmp, ['_attributes' => [
|
||||||
|
'exportAjax' => $this->isAjaxExport()?'1':'0'
|
||||||
|
]]);
|
||||||
|
}
|
||||||
foreach($this->edgesCollectionContainer as $col) {
|
foreach($this->edgesCollectionContainer as $col) {
|
||||||
$tmp[$col->getName()] = $col->generateXML();
|
$tmp[$col->getName()] = $col->generateXML();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,4 +82,20 @@ class Checkbox extends Base
|
|||||||
return implode(", ", $tmp);
|
return implode(", ", $tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function generateJson(): \stdClass
|
||||||
|
{
|
||||||
|
$obj = parent::generateJson();
|
||||||
|
if($this->isRequire()) {
|
||||||
|
$obj->required = $this->isRequire();
|
||||||
|
}
|
||||||
|
$obj->type = 7;
|
||||||
|
$obj->options = [];
|
||||||
|
|
||||||
|
foreach($this->options as $opt) {
|
||||||
|
$obj->options[] = $opt->generateJson();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,5 +28,13 @@ class ColorDBSelect extends Select
|
|||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function generateXML(): array
|
||||||
|
{
|
||||||
|
return array_merge_recursive(
|
||||||
|
parent::generateXML(),
|
||||||
|
['_attributes' => ['mode' => 'colordb', 'container' => $this->container]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,4 +11,20 @@ class Hidden extends Base
|
|||||||
$obj->type = 1;
|
$obj->type = 1;
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function generateXML(): array
|
||||||
|
{
|
||||||
|
if($this->getDefault() == "") {
|
||||||
|
return parent::generateXML();
|
||||||
|
}
|
||||||
|
|
||||||
|
return array_merge_recursive([
|
||||||
|
'_attributes' => [
|
||||||
|
'default' => $this->getDefault(),
|
||||||
|
]
|
||||||
|
]
|
||||||
|
, parent::generateXML());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,14 +55,33 @@ class Input extends Base
|
|||||||
|
|
||||||
public function generateXML(): array
|
public function generateXML(): array
|
||||||
{
|
{
|
||||||
return array_merge_recursive([
|
$tmp = [];
|
||||||
'_attributes' => [
|
|
||||||
'placeholder' => $this->getPlaceHolder(),
|
if($this->getPlaceHolder() != "") {
|
||||||
'default' => $this->getDefault(),
|
$tmp['_attributes'] = [
|
||||||
'require' => $this->isRequire()?'true':'false',
|
'placeholder' => $this->getPlaceHolder()
|
||||||
]
|
];
|
||||||
]
|
}
|
||||||
, parent::generateXML());
|
if($this->getMinValue() !== null) {
|
||||||
|
$tmp = array_merge_recursive($tmp, ['_attributes' => [
|
||||||
|
'min' => $this->getMinValue()
|
||||||
|
]]);
|
||||||
|
}
|
||||||
|
if($this->getMaxValue() !== null) {
|
||||||
|
$tmp = array_merge_recursive($tmp, ['_attributes' => [
|
||||||
|
'max' => $this->getMaxValue()
|
||||||
|
]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$tmp = array_merge_recursive($tmp, ['_attributes' => [
|
||||||
|
'default' => $this->getDefault()
|
||||||
|
]]);
|
||||||
|
if($this->isRequire()) {
|
||||||
|
$tmp = array_merge_recursive($tmp, ['_attributes' => [
|
||||||
|
'require' => 'true'
|
||||||
|
]]);
|
||||||
|
}
|
||||||
|
return array_merge_recursive($tmp, parent::generateXML());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function generateJson(): \stdClass
|
public function generateJson(): \stdClass
|
||||||
@ -70,6 +89,12 @@ class Input extends Base
|
|||||||
$obj = parent::generateJson();
|
$obj = parent::generateJson();
|
||||||
$obj->placeHolder = $this->placeHolder;
|
$obj->placeHolder = $this->placeHolder;
|
||||||
$obj->required = $this->isRequire();
|
$obj->required = $this->isRequire();
|
||||||
|
if($this->getMinValue() !== NULL) {
|
||||||
|
$obj->minValue = $this->getMinValue();
|
||||||
|
}
|
||||||
|
if($this->getMaxValue() !== null) {
|
||||||
|
$obj->maxValue = $this->getMaxValue();
|
||||||
|
}
|
||||||
$obj->type = 2;
|
$obj->type = 2;
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -174,10 +174,18 @@ class PaperDbSelect extends Select
|
|||||||
$this->newPaperObject = $newPaperObject;
|
$this->newPaperObject = $newPaperObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function generateXML(): array
|
||||||
|
{
|
||||||
|
return array_merge_recursive(
|
||||||
|
parent::generateXML(),
|
||||||
|
['_attributes' => ['mode' => 'papierdb', 'container' => $this->container]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function generateJson(): \stdClass
|
public function generateJson(): \stdClass
|
||||||
{
|
{
|
||||||
$obj = parent::generateJson();
|
$obj = parent::generateJson();
|
||||||
$obj->mode = 'paperdb';
|
$obj->mode = 'papierdb';
|
||||||
$obj->container = $this->container;
|
$obj->container = $this->container;
|
||||||
|
|
||||||
return $obj;
|
return $obj;
|
||||||
|
|||||||
@ -6,4 +6,12 @@ class Textarea extends Base
|
|||||||
|
|
||||||
public $type = 'textarea';
|
public $type = 'textarea';
|
||||||
|
|
||||||
}
|
public function generateJson(): \stdClass
|
||||||
|
{
|
||||||
|
$obj = parent::generateJson();
|
||||||
|
$obj->type = 5;
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@ class Parser
|
|||||||
{
|
{
|
||||||
$optionParser = new \PSC\Library\Calc\Option\Parser($this->paperContainer, $this->paperRepository, $this->templates);
|
$optionParser = new \PSC\Library\Calc\Option\Parser($this->paperContainer, $this->paperRepository, $this->templates);
|
||||||
$this->article = new Article($json['name'], $json['uuid']?? null);
|
$this->article = new Article($json['name'], $json['uuid']?? null);
|
||||||
|
|
||||||
foreach ($json['options'] as $option) {
|
foreach ($json['options'] as $option) {
|
||||||
$obj = $optionParser->getOptByJsonType($option['type'], $option['mode']?? null);
|
$obj = $optionParser->getOptByJsonType($option['type'], $option['mode']?? null);
|
||||||
if($obj) {
|
if($obj) {
|
||||||
|
|||||||
204
test.xml
204
test.xml
@ -1,204 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<testsuites>
|
|
||||||
<testsuite name="" tests="101" assertions="176" errors="0" warnings="0" failures="0" skipped="0" time="2.651725">
|
|
||||||
<testsuite name="Calc Tests Suite" tests="101" assertions="176" errors="0" warnings="0" failures="0" skipped="0" time="2.651725">
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Article\CalendarXmlTest" file="/home/thomas/projekte/calc/tests/Article/CalendarXmlTest.php" tests="5" assertions="10" errors="0" warnings="0" failures="0" skipped="0" time="0.040370">
|
|
||||||
<testcase name="testIfArticleCountInXmlCorrect" class="PSC\Library\Calc\Tests\Article\CalendarXmlTest" classname="PSC.Library.Calc.Tests.Article.CalendarXmlTest" file="/home/thomas/projekte/calc/tests/Article/CalendarXmlTest.php" line="14" assertions="2" time="0.006568"/>
|
|
||||||
<testcase name="testGetArticleByName" class="PSC\Library\Calc\Tests\Article\CalendarXmlTest" classname="PSC.Library.Calc.Tests.Article.CalendarXmlTest" file="/home/thomas/projekte/calc/tests/Article/CalendarXmlTest.php" line="29" assertions="2" time="0.008848"/>
|
|
||||||
<testcase name="testGetOptionById" class="PSC\Library\Calc\Tests\Article\CalendarXmlTest" classname="PSC.Library.Calc.Tests.Article.CalendarXmlTest" file="/home/thomas/projekte/calc/tests/Article/CalendarXmlTest.php" line="47" assertions="1" time="0.008991"/>
|
|
||||||
<testcase name="testGetPrintableValuesFromSavedParamsWithCleaning" class="PSC\Library\Calc\Tests\Article\CalendarXmlTest" classname="PSC.Library.Calc.Tests.Article.CalendarXmlTest" file="/home/thomas/projekte/calc/tests/Article/CalendarXmlTest.php" line="68" assertions="4" time="0.007936"/>
|
|
||||||
<testcase name="testGetOptionsForArticle" class="PSC\Library\Calc\Tests\Article\CalendarXmlTest" classname="PSC.Library.Calc.Tests.Article.CalendarXmlTest" file="/home/thomas/projekte/calc/tests/Article/CalendarXmlTest.php" line="114" assertions="1" time="0.008028"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Article\Complete1Test" file="/home/thomas/projekte/calc/tests/Article/Complete1Test.php" tests="6" assertions="7" errors="0" warnings="0" failures="0" skipped="0" time="0.033801">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Article\Complete1Test" classname="PSC.Library.Calc.Tests.Article.Complete1Test" file="/home/thomas/projekte/calc/tests/Article/Complete1Test.php" line="24" assertions="1" time="0.004383"/>
|
|
||||||
<testcase name="testIfParserGetArticleCorrect" class="PSC\Library\Calc\Tests\Article\Complete1Test" classname="PSC.Library.Calc.Tests.Article.Complete1Test" file="/home/thomas/projekte/calc/tests/Article/Complete1Test.php" line="29" assertions="2" time="0.006079"/>
|
|
||||||
<testcase name="testIfCalcArticleCorrect" class="PSC\Library\Calc\Tests\Article\Complete1Test" classname="PSC.Library.Calc.Tests.Article.Complete1Test" file="/home/thomas/projekte/calc/tests/Article/Complete1Test.php" line="37" assertions="1" time="0.005684"/>
|
|
||||||
<testcase name="testIfCalcReturnsPrice" class="PSC\Library\Calc\Tests\Article\Complete1Test" classname="PSC.Library.Calc.Tests.Article.Complete1Test" file="/home/thomas/projekte/calc/tests/Article/Complete1Test.php" line="47" assertions="1" time="0.005865"/>
|
|
||||||
<testcase name="testIfCalcReturnsPriceWithEdge" class="PSC\Library\Calc\Tests\Article\Complete1Test" classname="PSC.Library.Calc.Tests.Article.Complete1Test" file="/home/thomas/projekte/calc/tests/Article/Complete1Test.php" line="56" assertions="1" time="0.005922"/>
|
|
||||||
<testcase name="testIfCalcCompletePrice" class="PSC\Library\Calc\Tests\Article\Complete1Test" classname="PSC.Library.Calc.Tests.Article.Complete1Test" file="/home/thomas/projekte/calc/tests/Article/Complete1Test.php" line="65" assertions="1" time="0.005868"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Article\SimpleXmlTest" file="/home/thomas/projekte/calc/tests/Article/SimpleXmlTest.php" tests="3" assertions="6" errors="0" warnings="0" failures="0" skipped="0" time="0.011156">
|
|
||||||
<testcase name="testIfArticleCountInXmlCorrect" class="PSC\Library\Calc\Tests\Article\SimpleXmlTest" classname="PSC.Library.Calc.Tests.Article.SimpleXmlTest" file="/home/thomas/projekte/calc/tests/Article/SimpleXmlTest.php" line="10" assertions="2" time="0.003796"/>
|
|
||||||
<testcase name="testIfArticleCountInXmlCorrectWith2Article" class="PSC\Library\Calc\Tests\Article\SimpleXmlTest" classname="PSC.Library.Calc.Tests.Article.SimpleXmlTest" file="/home/thomas/projekte/calc/tests/Article/SimpleXmlTest.php" line="18" assertions="2" time="0.003188"/>
|
|
||||||
<testcase name="testGetArticleByName" class="PSC\Library\Calc\Tests\Article\SimpleXmlTest" classname="PSC.Library.Calc.Tests.Article.SimpleXmlTest" file="/home/thomas/projekte/calc/tests/Article/SimpleXmlTest.php" line="26" assertions="2" time="0.004172"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Calc\OptionsRemoveTest" file="/home/thomas/projekte/calc/tests/Calc/OptionsRemoveTest.php" tests="3" assertions="6" errors="0" warnings="0" failures="0" skipped="0" time="0.013930">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Calc\OptionsRemoveTest" classname="PSC.Library.Calc.Tests.Calc.OptionsRemoveTest" file="/home/thomas/projekte/calc/tests/Calc/OptionsRemoveTest.php" line="26" assertions="1" time="0.004148"/>
|
|
||||||
<testcase name="testIfParserGetArticleCorrect" class="PSC\Library\Calc\Tests\Calc\OptionsRemoveTest" classname="PSC.Library.Calc.Tests.Calc.OptionsRemoveTest" file="/home/thomas/projekte/calc/tests/Calc/OptionsRemoveTest.php" line="31" assertions="2" time="0.004760"/>
|
|
||||||
<testcase name="testIfOptionsNotValid" class="PSC\Library\Calc\Tests\Calc\OptionsRemoveTest" classname="PSC.Library.Calc.Tests.Calc.OptionsRemoveTest" file="/home/thomas/projekte/calc/tests/Calc/OptionsRemoveTest.php" line="39" assertions="3" time="0.005022"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Calc\PreisPauschaleTest" file="/home/thomas/projekte/calc/tests/Calc/PreisPauschaleTest.php" tests="2" assertions="4" errors="0" warnings="0" failures="0" skipped="0" time="0.008717">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Calc\PreisPauschaleTest" classname="PSC.Library.Calc.Tests.Calc.PreisPauschaleTest" file="/home/thomas/projekte/calc/tests/Calc/PreisPauschaleTest.php" line="27" assertions="1" time="0.003755"/>
|
|
||||||
<testcase name="testPreisPauschaleCalc" class="PSC\Library\Calc\Tests\Calc\PreisPauschaleTest" classname="PSC.Library.Calc.Tests.Calc.PreisPauschaleTest" file="/home/thomas/projekte/calc/tests/Calc/PreisPauschaleTest.php" line="32" assertions="3" time="0.004962"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Calc\PriceMinTest" file="/home/thomas/projekte/calc/tests/Calc/PriceMinTest.php" tests="3" assertions="7" errors="0" warnings="0" failures="0" skipped="0" time="0.016617">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Calc\PriceMinTest" classname="PSC.Library.Calc.Tests.Calc.PriceMinTest" file="/home/thomas/projekte/calc/tests/Calc/PriceMinTest.php" line="27" assertions="1" time="0.004310"/>
|
|
||||||
<testcase name="testIfParserGetMinPrice" class="PSC\Library\Calc\Tests\Calc\PriceMinTest" classname="PSC.Library.Calc.Tests.Calc.PriceMinTest" file="/home/thomas/projekte/calc/tests/Calc/PriceMinTest.php" line="32" assertions="3" time="0.006410"/>
|
|
||||||
<testcase name="testIfCalcReturnsGrenzeWithFormular" class="PSC\Library\Calc\Tests\Calc\PriceMinTest" classname="PSC.Library.Calc.Tests.Calc.PriceMinTest" file="/home/thomas/projekte/calc/tests/Calc/PriceMinTest.php" line="42" assertions="3" time="0.005896"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\CalcValue\AddCalcValuesTest" file="/home/thomas/projekte/calc/tests/CalcValue/AddCalcValuesTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.005318">
|
|
||||||
<testcase name="testIfParseValue" class="PSC\Library\Calc\Tests\CalcValue\AddCalcValuesTest" classname="PSC.Library.Calc.Tests.CalcValue.AddCalcValuesTest" file="/home/thomas/projekte/calc/tests/CalcValue/AddCalcValuesTest.php" line="25" assertions="1" time="0.005318"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\CalcValue\ComplexTest" file="/home/thomas/projekte/calc/tests/CalcValue/ComplexTest.php" tests="2" assertions="4" errors="0" warnings="0" failures="0" skipped="0" time="0.185548">
|
|
||||||
<testcase name="testIfParseValue" class="PSC\Library\Calc\Tests\CalcValue\ComplexTest" classname="PSC.Library.Calc.Tests.CalcValue.ComplexTest" file="/home/thomas/projekte/calc/tests/CalcValue/ComplexTest.php" line="36" assertions="1" time="0.092259"/>
|
|
||||||
<testcase name="testIfPaperGrammaturValue" class="PSC\Library\Calc\Tests\CalcValue\ComplexTest" classname="PSC.Library.Calc.Tests.CalcValue.ComplexTest" file="/home/thomas/projekte/calc/tests/CalcValue/ComplexTest.php" line="41" assertions="3" time="0.093289"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\CalcValue\SimpleTest" file="/home/thomas/projekte/calc/tests/CalcValue/SimpleTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.005138">
|
|
||||||
<testcase name="testIfParseValue" class="PSC\Library\Calc\Tests\CalcValue\SimpleTest" classname="PSC.Library.Calc.Tests.CalcValue.SimpleTest" file="/home/thomas/projekte/calc/tests/CalcValue/SimpleTest.php" line="24" assertions="1" time="0.005138"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Complex\FirstTest" file="/home/thomas/projekte/calc/tests/Complex/FirstTest.php" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.164858">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Complex\FirstTest" classname="PSC.Library.Calc.Tests.Complex.FirstTest" file="/home/thomas/projekte/calc/tests/Complex/FirstTest.php" line="38" assertions="1" time="0.007920"/>
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Complex\FirstTest" classname="PSC.Library.Calc.Tests.Complex.FirstTest" file="/home/thomas/projekte/calc/tests/Complex/FirstTest.php" line="43" assertions="1" time="0.156938"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Complex\FiveTest" file="/home/thomas/projekte/calc/tests/Complex/FiveTest.php" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.052512">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Complex\FiveTest" classname="PSC.Library.Calc.Tests.Complex.FiveTest" file="/home/thomas/projekte/calc/tests/Complex/FiveTest.php" line="38" assertions="1" time="0.009269"/>
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Complex\FiveTest" classname="PSC.Library.Calc.Tests.Complex.FiveTest" file="/home/thomas/projekte/calc/tests/Complex/FiveTest.php" line="43" assertions="1" time="0.043243"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Complex\FourTest" file="/home/thomas/projekte/calc/tests/Complex/FourTest.php" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.032772">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Complex\FourTest" classname="PSC.Library.Calc.Tests.Complex.FourTest" file="/home/thomas/projekte/calc/tests/Complex/FourTest.php" line="38" assertions="1" time="0.007311"/>
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Complex\FourTest" classname="PSC.Library.Calc.Tests.Complex.FourTest" file="/home/thomas/projekte/calc/tests/Complex/FourTest.php" line="43" assertions="1" time="0.025460"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Complex\PaperSavedTest" file="/home/thomas/projekte/calc/tests/Complex/PaperSavedTest.php" tests="2" assertions="3" errors="0" warnings="0" failures="0" skipped="0" time="0.162309">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Complex\PaperSavedTest" classname="PSC.Library.Calc.Tests.Complex.PaperSavedTest" file="/home/thomas/projekte/calc/tests/Complex/PaperSavedTest.php" line="38" assertions="1" time="0.007655"/>
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Complex\PaperSavedTest" classname="PSC.Library.Calc.Tests.Complex.PaperSavedTest" file="/home/thomas/projekte/calc/tests/Complex/PaperSavedTest.php" line="43" assertions="2" time="0.154654"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Complex\SecondTest" file="/home/thomas/projekte/calc/tests/Complex/SecondTest.php" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.035476">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Complex\SecondTest" classname="PSC.Library.Calc.Tests.Complex.SecondTest" file="/home/thomas/projekte/calc/tests/Complex/SecondTest.php" line="38" assertions="1" time="0.007723"/>
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Complex\SecondTest" classname="PSC.Library.Calc.Tests.Complex.SecondTest" file="/home/thomas/projekte/calc/tests/Complex/SecondTest.php" line="43" assertions="1" time="0.027753"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Complex\SixTest" file="/home/thomas/projekte/calc/tests/Complex/SixTest.php" tests="3" assertions="3" errors="0" warnings="0" failures="0" skipped="0" time="0.019537">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Complex\SixTest" classname="PSC.Library.Calc.Tests.Complex.SixTest" file="/home/thomas/projekte/calc/tests/Complex/SixTest.php" line="38" assertions="1" time="0.004834"/>
|
|
||||||
<testcase name="testIfSelectedOptionsCorrect" class="PSC\Library\Calc\Tests\Complex\SixTest" classname="PSC.Library.Calc.Tests.Complex.SixTest" file="/home/thomas/projekte/calc/tests/Complex/SixTest.php" line="43" assertions="1" time="0.007301"/>
|
|
||||||
<testcase name="testIfCalcCorrect" class="PSC\Library\Calc\Tests\Complex\SixTest" classname="PSC.Library.Calc.Tests.Complex.SixTest" file="/home/thomas/projekte/calc/tests/Complex/SixTest.php" line="49" assertions="1" time="0.007402"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Complex\ThirdTest" file="/home/thomas/projekte/calc/tests/Complex/ThirdTest.php" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.033225">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Complex\ThirdTest" classname="PSC.Library.Calc.Tests.Complex.ThirdTest" file="/home/thomas/projekte/calc/tests/Complex/ThirdTest.php" line="38" assertions="1" time="0.007166"/>
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Complex\ThirdTest" classname="PSC.Library.Calc.Tests.Complex.ThirdTest" file="/home/thomas/projekte/calc/tests/Complex/ThirdTest.php" line="43" assertions="1" time="0.026058"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\A\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/A/CalcTest.php" tests="3" assertions="3" errors="0" warnings="0" failures="0" skipped="0" time="0.605025">
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Customer\A\CalcTest" classname="PSC.Library.Calc.Tests.Customer.A.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/A/CalcTest.php" line="39" assertions="1" time="0.202630"/>
|
|
||||||
<testcase name="testVariant1" class="PSC\Library\Calc\Tests\Customer\A\CalcTest" classname="PSC.Library.Calc.Tests.Customer.A.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/A/CalcTest.php" line="44" assertions="1" time="0.202844"/>
|
|
||||||
<testcase name="testVariant2" class="PSC\Library\Calc\Tests\Customer\A\CalcTest" classname="PSC.Library.Calc.Tests.Customer.A.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/A/CalcTest.php" line="49" assertions="1" time="0.199551"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\B\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/B/CalcTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.086422">
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Customer\B\CalcTest" classname="PSC.Library.Calc.Tests.Customer.B.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/B/CalcTest.php" line="39" assertions="1" time="0.086422"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\C\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/C/CalcTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.174521">
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Customer\C\CalcTest" classname="PSC.Library.Calc.Tests.Customer.C.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/C/CalcTest.php" line="39" assertions="1" time="0.174521"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\D\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/D/CalcTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.023417">
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Customer\D\CalcTest" classname="PSC.Library.Calc.Tests.Customer.D.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/D/CalcTest.php" line="39" assertions="1" time="0.023417"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\E\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/E/CalcTest.php" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.022219">
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Customer\E\CalcTest" classname="PSC.Library.Calc.Tests.Customer.E.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/E/CalcTest.php" line="39" assertions="1" time="0.011260"/>
|
|
||||||
<testcase name="testIfAnwender2PriceIsOk" class="PSC\Library\Calc\Tests\Customer\E\CalcTest" classname="PSC.Library.Calc.Tests.Customer.E.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/E/CalcTest.php" line="44" assertions="1" time="0.010960"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\F\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/F/CalcTest.php" tests="3" assertions="3" errors="0" warnings="0" failures="0" skipped="0" time="0.120692">
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Customer\F\CalcTest" classname="PSC.Library.Calc.Tests.Customer.F.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/F/CalcTest.php" line="39" assertions="1" time="0.039803"/>
|
|
||||||
<testcase name="testIfOtherPriceIsOk" class="PSC\Library\Calc\Tests\Customer\F\CalcTest" classname="PSC.Library.Calc.Tests.Customer.F.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/F/CalcTest.php" line="44" assertions="1" time="0.040827"/>
|
|
||||||
<testcase name="testIfOtherPrice2IsOk" class="PSC\Library\Calc\Tests\Customer\F\CalcTest" classname="PSC.Library.Calc.Tests.Customer.F.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/F/CalcTest.php" line="50" assertions="1" time="0.040062"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\G\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/G/CalcTest.php" tests="3" assertions="5" errors="0" warnings="0" failures="0" skipped="0" time="0.019071">
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Customer\G\CalcTest" classname="PSC.Library.Calc.Tests.Customer.G.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/G/CalcTest.php" line="39" assertions="1" time="0.006324"/>
|
|
||||||
<testcase name="testIfDisplayValues" class="PSC\Library\Calc\Tests\Customer\G\CalcTest" classname="PSC.Library.Calc.Tests.Customer.G.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/G/CalcTest.php" line="44" assertions="2" time="0.006371"/>
|
|
||||||
<testcase name="testIfAjaxValues" class="PSC\Library\Calc\Tests\Customer\G\CalcTest" classname="PSC.Library.Calc.Tests.Customer.G.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/G/CalcTest.php" line="50" assertions="2" time="0.006375"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\H\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/H/CalcTest.php" tests="3" assertions="5" errors="0" warnings="0" failures="0" skipped="0" time="0.034539">
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Customer\H\CalcTest" classname="PSC.Library.Calc.Tests.Customer.H.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/H/CalcTest.php" line="39" assertions="1" time="0.011201"/>
|
|
||||||
<testcase name="testIfDisplayValues" class="PSC\Library\Calc\Tests\Customer\H\CalcTest" classname="PSC.Library.Calc.Tests.Customer.H.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/H/CalcTest.php" line="44" assertions="2" time="0.011680"/>
|
|
||||||
<testcase name="testIfAjaxValues" class="PSC\Library\Calc\Tests\Customer\H\CalcTest" classname="PSC.Library.Calc.Tests.Customer.H.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/H/CalcTest.php" line="50" assertions="2" time="0.011658"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\I\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/I/CalcTest.php" tests="3" assertions="3" errors="0" warnings="0" failures="0" skipped="0" time="0.587861">
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Customer\I\CalcTest" classname="PSC.Library.Calc.Tests.Customer.I.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/I/CalcTest.php" line="39" assertions="1" time="0.196759"/>
|
|
||||||
<testcase name="testIf6000PriceIsOk" class="PSC\Library\Calc\Tests\Customer\I\CalcTest" classname="PSC.Library.Calc.Tests.Customer.I.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/I/CalcTest.php" line="44" assertions="1" time="0.195111"/>
|
|
||||||
<testcase name="testIfDruckfarbenPriceIsOk" class="PSC\Library\Calc\Tests\Customer\I\CalcTest" classname="PSC.Library.Calc.Tests.Customer.I.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/I/CalcTest.php" line="50" assertions="1" time="0.195991"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\J\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/J/CalcTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.005543">
|
|
||||||
<testcase name="testIfDefaultPriceIsOk" class="PSC\Library\Calc\Tests\Customer\J\CalcTest" classname="PSC.Library.Calc.Tests.Customer.J.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/J/CalcTest.php" line="40" assertions="1" time="0.005543"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\K\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/K/CalcTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.012428">
|
|
||||||
<testcase name="testCalcPlan" class="PSC\Library\Calc\Tests\Customer\K\CalcTest" classname="PSC.Library.Calc.Tests.Customer.K.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/K/CalcTest.php" line="40" assertions="1" time="0.012428"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\L\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/L/CalcTest.php" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.011596">
|
|
||||||
<testcase name="testCalcPlan" class="PSC\Library\Calc\Tests\Customer\L\CalcTest" classname="PSC.Library.Calc.Tests.Customer.L.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/L/CalcTest.php" line="40" assertions="1" time="0.006019"/>
|
|
||||||
<testcase name="testCalcVarPlan" class="PSC\Library\Calc\Tests\Customer\L\CalcTest" classname="PSC.Library.Calc.Tests.Customer.L.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/L/CalcTest.php" line="47" assertions="1" time="0.005577"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\M\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/M/CalcTest.php" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.010521">
|
|
||||||
<testcase name="testDefaultOption" class="PSC\Library\Calc\Tests\Customer\M\CalcTest" classname="PSC.Library.Calc.Tests.Customer.M.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/M/CalcTest.php" line="40" assertions="1" time="0.005262"/>
|
|
||||||
<testcase name="testCalcValues" class="PSC\Library\Calc\Tests\Customer\M\CalcTest" classname="PSC.Library.Calc.Tests.Customer.M.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/M/CalcTest.php" line="47" assertions="1" time="0.005259"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\N\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/N/CalcTest.php" tests="1" assertions="3" errors="0" warnings="0" failures="0" skipped="0" time="0.006484">
|
|
||||||
<testcase name="testPreCalcOption" class="PSC\Library\Calc\Tests\Customer\N\CalcTest" classname="PSC.Library.Calc.Tests.Customer.N.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/N/CalcTest.php" line="40" assertions="3" time="0.006484"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Customer\O\CalcTest" file="/home/thomas/projekte/calc/tests/Customer/O/CalcTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.005463">
|
|
||||||
<testcase name="testPreCalcOption" class="PSC\Library\Calc\Tests\Customer\O\CalcTest" classname="PSC.Library.Calc.Tests.Customer.O.CalcTest" file="/home/thomas/projekte/calc/tests/Customer/O/CalcTest.php" line="40" assertions="1" time="0.005463"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\General\LoadTest" file="/home/thomas/projekte/calc/tests/General/LoadTest.php" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.007783">
|
|
||||||
<testcase name="testSimpleLoadXmlFromString" class="PSC\Library\Calc\Tests\General\LoadTest" classname="PSC.Library.Calc.Tests.General.LoadTest" file="/home/thomas/projekte/calc/tests/General/LoadTest.php" line="10" assertions="1" time="0.003450"/>
|
|
||||||
<testcase name="testWrongEval" class="PSC\Library\Calc\Tests\General\LoadTest" classname="PSC.Library.Calc.Tests.General.LoadTest" file="/home/thomas/projekte/calc/tests/General/LoadTest.php" line="16" assertions="1" time="0.004333"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Article\papierDbWithFormelTest" file="/home/thomas/projekte/calc/tests/Legacy/papierDbWithFormelTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.006363">
|
|
||||||
<testcase name="testSelectWithGrenzen" class="PSC\Library\Calc\Tests\Article\papierDbWithFormelTest" classname="PSC.Library.Calc.Tests.Article.papierDbWithFormelTest" file="/home/thomas/projekte/calc/tests/Legacy/papierDbWithFormelTest.php" line="31" assertions="1" time="0.006363"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Article\selectWithGrenzenTest" file="/home/thomas/projekte/calc/tests/Legacy/selectWithGrenzenTest.php" tests="2" assertions="5" errors="0" warnings="0" failures="0" skipped="0" time="0.013750">
|
|
||||||
<testcase name="testSelectWithGrenzen" class="PSC\Library\Calc\Tests\Article\selectWithGrenzenTest" classname="PSC.Library.Calc.Tests.Article.selectWithGrenzenTest" file="/home/thomas/projekte/calc/tests/Legacy/selectWithGrenzenTest.php" line="31" assertions="2" time="0.006833"/>
|
|
||||||
<testcase name="testSelectWithGrenzenParams" class="PSC\Library\Calc\Tests\Article\selectWithGrenzenTest" classname="PSC.Library.Calc.Tests.Article.selectWithGrenzenTest" file="/home/thomas/projekte/calc/tests/Legacy/selectWithGrenzenTest.php" line="42" assertions="3" time="0.006917"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Parse\Edge\ContainerTest" file="/home/thomas/projekte/calc/tests/Parse/Edge/ContainerTest.php" tests="1" assertions="3" errors="0" warnings="0" failures="0" skipped="0" time="0.002922">
|
|
||||||
<testcase name="testIfLoadsCorrect" class="PSC\Library\Calc\Tests\Parse\Edge\ContainerTest" classname="PSC.Library.Calc.Tests.Parse.Edge.ContainerTest" file="/home/thomas/projekte/calc/tests/Parse/Edge/ContainerTest.php" line="9" assertions="3" time="0.002922"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Parse\Edge\SimpleTest" file="/home/thomas/projekte/calc/tests/Parse/Edge/SimpleTest.php" tests="4" assertions="25" errors="0" warnings="0" failures="0" skipped="0" time="0.010690">
|
|
||||||
<testcase name="testIfOneValue" class="PSC\Library\Calc\Tests\Parse\Edge\SimpleTest" classname="PSC.Library.Calc.Tests.Parse.Edge.SimpleTest" file="/home/thomas/projekte/calc/tests/Parse/Edge/SimpleTest.php" line="9" assertions="6" time="0.002710"/>
|
|
||||||
<testcase name="testIfRegionFrom" class="PSC\Library\Calc\Tests\Parse\Edge\SimpleTest" classname="PSC.Library.Calc.Tests.Parse.Edge.SimpleTest" file="/home/thomas/projekte/calc/tests/Parse/Edge/SimpleTest.php" line="26" assertions="6" time="0.002606"/>
|
|
||||||
<testcase name="testIfRegionFromTo" class="PSC\Library\Calc\Tests\Parse\Edge\SimpleTest" classname="PSC.Library.Calc.Tests.Parse.Edge.SimpleTest" file="/home/thomas/projekte/calc/tests/Parse/Edge/SimpleTest.php" line="43" assertions="7" time="0.002551"/>
|
|
||||||
<testcase name="testIfCommaSeperated" class="PSC\Library\Calc\Tests\Parse\Edge\SimpleTest" classname="PSC.Library.Calc.Tests.Parse.Edge.SimpleTest" file="/home/thomas/projekte/calc/tests/Parse/Edge/SimpleTest.php" line="61" assertions="6" time="0.002823"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Option\Type\CheckboxTest" file="/home/thomas/projekte/calc/tests/Parse/Option/CheckboxTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.002872">
|
|
||||||
<testcase name="testIfCorrectType" class="PSC\Library\Calc\Tests\Option\Type\CheckboxTest" classname="PSC.Library.Calc.Tests.Option.Type.CheckboxTest" file="/home/thomas/projekte/calc/tests/Parse/Option/CheckboxTest.php" line="12" assertions="1" time="0.002872"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Option\Type\InputTest" file="/home/thomas/projekte/calc/tests/Parse/Option/InputTest.php" tests="2" assertions="6" errors="0" warnings="0" failures="0" skipped="0" time="0.005356">
|
|
||||||
<testcase name="testIfCorrectType" class="PSC\Library\Calc\Tests\Option\Type\InputTest" classname="PSC.Library.Calc.Tests.Option.Type.InputTest" file="/home/thomas/projekte/calc/tests/Parse/Option/InputTest.php" line="11" assertions="1" time="0.002595"/>
|
|
||||||
<testcase name="testIfCorrectAttributes" class="PSC\Library\Calc\Tests\Option\Type\InputTest" classname="PSC.Library.Calc.Tests.Option.Type.InputTest" file="/home/thomas/projekte/calc/tests/Parse/Option/InputTest.php" line="23" assertions="5" time="0.002761"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Option\Type\RadioboxTest" file="/home/thomas/projekte/calc/tests/Parse/Option/RadioboxTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.002867">
|
|
||||||
<testcase name="testIfCorrectType" class="PSC\Library\Calc\Tests\Option\Type\RadioboxTest" classname="PSC.Library.Calc.Tests.Option.Type.RadioboxTest" file="/home/thomas/projekte/calc/tests/Parse/Option/RadioboxTest.php" line="12" assertions="1" time="0.002867"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Option\Type\SelectTest" file="/home/thomas/projekte/calc/tests/Parse/Option/SelectTest.php" tests="4" assertions="13" errors="0" warnings="0" failures="0" skipped="0" time="0.014576">
|
|
||||||
<testcase name="testIfCorrectType" class="PSC\Library\Calc\Tests\Option\Type\SelectTest" classname="PSC.Library.Calc.Tests.Option.Type.SelectTest" file="/home/thomas/projekte/calc/tests/Parse/Option/SelectTest.php" line="13" assertions="1" time="0.003824"/>
|
|
||||||
<testcase name="testIfCorrectAttributes" class="PSC\Library\Calc\Tests\Option\Type\SelectTest" classname="PSC.Library.Calc.Tests.Option.Type.SelectTest" file="/home/thomas/projekte/calc/tests/Parse/Option/SelectTest.php" line="26" assertions="5" time="0.004019"/>
|
|
||||||
<testcase name="testIfPaperContainerReturnsCorrectItems" class="PSC\Library\Calc\Tests\Option\Type\SelectTest" classname="PSC.Library.Calc.Tests.Option.Type.SelectTest" file="/home/thomas/projekte/calc/tests/Parse/Option/SelectTest.php" line="43" assertions="5" time="0.002621"/>
|
|
||||||
<testcase name="testIfSelectWithPaperContainerModeReturnsCorrectOpt" class="PSC\Library\Calc\Tests\Option\Type\SelectTest" classname="PSC.Library.Calc.Tests.Option.Type.SelectTest" file="/home/thomas/projekte/calc/tests/Parse/Option/SelectTest.php" line="64" assertions="2" time="0.004112"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Option\Type\TextTest" file="/home/thomas/projekte/calc/tests/Parse/Option/TextTest.php" tests="2" assertions="5" errors="0" warnings="0" failures="0" skipped="0" time="0.005282">
|
|
||||||
<testcase name="testIfCorrectType" class="PSC\Library\Calc\Tests\Option\Type\TextTest" classname="PSC.Library.Calc.Tests.Option.Type.TextTest" file="/home/thomas/projekte/calc/tests/Parse/Option/TextTest.php" line="11" assertions="1" time="0.002619"/>
|
|
||||||
<testcase name="testIfCorrectAttributes" class="PSC\Library\Calc\Tests\Option\Type\TextTest" classname="PSC.Library.Calc.Tests.Option.Type.TextTest" file="/home/thomas/projekte/calc/tests/Parse/Option/TextTest.php" line="23" assertions="4" time="0.002663"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Option\Type\TextareaTest" file="/home/thomas/projekte/calc/tests/Parse/Option/TextareaTest.php" tests="2" assertions="5" errors="0" warnings="0" failures="0" skipped="0" time="0.005001">
|
|
||||||
<testcase name="testIfCorrectType" class="PSC\Library\Calc\Tests\Option\Type\TextareaTest" classname="PSC.Library.Calc.Tests.Option.Type.TextareaTest" file="/home/thomas/projekte/calc/tests/Parse/Option/TextareaTest.php" line="11" assertions="1" time="0.002482"/>
|
|
||||||
<testcase name="testIfCorrectAttributes" class="PSC\Library\Calc\Tests\Option\Type\TextareaTest" classname="PSC.Library.Calc.Tests.Option.Type.TextareaTest" file="/home/thomas/projekte/calc/tests/Parse/Option/TextareaTest.php" line="23" assertions="4" time="0.002518"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\PreCalc\ParseGroupTest" file="/home/thomas/projekte/calc/tests/PreCalc/ParseGroupTest.php" tests="2" assertions="3" errors="0" warnings="0" failures="0" skipped="0" time="0.005059">
|
|
||||||
<testcase name="testIfCorrectType" class="PSC\Library\Calc\Tests\PreCalc\ParseGroupTest" classname="PSC.Library.Calc.Tests.PreCalc.ParseGroupTest" file="/home/thomas/projekte/calc/tests/PreCalc/ParseGroupTest.php" line="10" assertions="1" time="0.002245"/>
|
|
||||||
<testcase name="testIfCountCorrect" class="PSC\Library\Calc\Tests\PreCalc\ParseGroupTest" classname="PSC.Library.Calc.Tests.PreCalc.ParseGroupTest" file="/home/thomas/projekte/calc/tests/PreCalc/ParseGroupTest.php" line="19" assertions="2" time="0.002814"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\PreCalc\ParseTest" file="/home/thomas/projekte/calc/tests/PreCalc/ParseTest.php" tests="2" assertions="3" errors="0" warnings="0" failures="0" skipped="0" time="0.005199">
|
|
||||||
<testcase name="testIfCorrectType" class="PSC\Library\Calc\Tests\PreCalc\ParseTest" classname="PSC.Library.Calc.Tests.PreCalc.ParseTest" file="/home/thomas/projekte/calc/tests/PreCalc/ParseTest.php" line="10" assertions="1" time="0.002578"/>
|
|
||||||
<testcase name="testIfCountIsCorrect" class="PSC\Library\Calc\Tests\PreCalc\ParseTest" classname="PSC.Library.Calc.Tests.PreCalc.ParseTest" file="/home/thomas/projekte/calc/tests/PreCalc/ParseTest.php" line="19" assertions="2" time="0.002621"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\PreCalc\ParseVariantTest" file="/home/thomas/projekte/calc/tests/PreCalc/ParseVariantTest.php" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.004787">
|
|
||||||
<testcase name="testIfCorrectType" class="PSC\Library\Calc\Tests\PreCalc\ParseVariantTest" classname="PSC.Library.Calc.Tests.PreCalc.ParseVariantTest" file="/home/thomas/projekte/calc/tests/PreCalc/ParseVariantTest.php" line="10" assertions="1" time="0.002391"/>
|
|
||||||
<testcase name="testIfNameIsCorrect" class="PSC\Library\Calc\Tests\PreCalc\ParseVariantTest" classname="PSC.Library.Calc.Tests.PreCalc.ParseVariantTest" file="/home/thomas/projekte/calc/tests/PreCalc/ParseVariantTest.php" line="19" assertions="1" time="0.002396"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\PreCalc\ValueTest" file="/home/thomas/projekte/calc/tests/PreCalc/ValueTest.php" tests="2" assertions="3" errors="0" warnings="0" failures="0" skipped="0" time="0.004480">
|
|
||||||
<testcase name="testIfCorrectType" class="PSC\Library\Calc\Tests\PreCalc\ValueTest" classname="PSC.Library.Calc.Tests.PreCalc.ValueTest" file="/home/thomas/projekte/calc/tests/PreCalc/ValueTest.php" line="10" assertions="1" time="0.002214"/>
|
|
||||||
<testcase name="testIfCorret" class="PSC\Library\Calc\Tests\PreCalc\ValueTest" classname="PSC.Library.Calc.Tests.PreCalc.ValueTest" file="/home/thomas/projekte/calc/tests/PreCalc/ValueTest.php" line="19" assertions="2" time="0.002266"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\Recursiv\SecondTest" file="/home/thomas/projekte/calc/tests/Recursiv/FirstTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.005671">
|
|
||||||
<testcase name="testIfArticleCountIsCorrect" class="PSC\Library\Calc\Tests\Recursiv\SecondTest" classname="PSC.Library.Calc.Tests.Recursiv.SecondTest" file="/home/thomas/projekte/calc/tests/Recursiv/FirstTest.php" line="40" assertions="1" time="0.005671"/>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PSC\Library\Calc\Tests\testTest" file="/home/thomas/projekte/calc/tests/testTest.php" tests="1" assertions="1" errors="0" warnings="0" failures="0" skipped="0" time="0.001980">
|
|
||||||
<testcase name="testOk" class="PSC\Library\Calc\Tests\testTest" classname="PSC.Library.Calc.Tests.testTest" file="/home/thomas/projekte/calc/tests/testTest.php" line="17" assertions="1" time="0.001980"/>
|
|
||||||
</testsuite>
|
|
||||||
</testsuite>
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<option id="rueckkarton" name="Rückkarton" type="Select" default="" require="true" mode="papierdb" container="bloecke-rueckkarton">
|
<option id="rueckkarton" name="Rückkarton" type="Select" default="" require="true" mode="papierdb" container="bloecke-rueckkarton">
|
||||||
</option>
|
</option>
|
||||||
|
|
||||||
<option id="br" name="" type="Text"></option>
|
<option id="br" name="br" type="Text"></option>
|
||||||
|
|
||||||
<option id="druckfarben" name="Druck" type="Select" require="true">
|
<option id="druckfarben" name="Druck" type="Select" require="true">
|
||||||
<opt id="10" name="1/0">
|
<opt id="10" name="1/0">
|
||||||
@ -1018,7 +1018,7 @@
|
|||||||
|
|
||||||
<!-- FARBE RÜCKSEITE ENDE -->
|
<!-- FARBE RÜCKSEITE ENDE -->
|
||||||
|
|
||||||
<option id="br2" name="" type="Text"></option>
|
<option id="br2" name="br2" type="Text"></option>
|
||||||
|
|
||||||
<option id="abheftlochung" name="Abheftlochung" type="Select" default="1" require="true">
|
<option id="abheftlochung" name="Abheftlochung" type="Select" default="1" require="true">
|
||||||
<opt id="0" name="Ohne"></opt>
|
<opt id="0" name="Ohne"></opt>
|
||||||
@ -1049,7 +1049,7 @@
|
|||||||
</opt>
|
</opt>
|
||||||
</option>
|
</option>
|
||||||
|
|
||||||
<option id="br3" name="" type="Text"></option>
|
<option id="br3" name="br3" type="Text"></option>
|
||||||
|
|
||||||
<option id="datencheck" name="Datencheck" type="Select" default="1" require="true">
|
<option id="datencheck" name="Datencheck" type="Select" default="1" require="true">
|
||||||
<opt id="1" name="Basis-Datencheck"></opt>
|
<opt id="1" name="Basis-Datencheck"></opt>
|
||||||
|
|||||||
31
tests/Json/FromXmlToJsonAndBackTest.php
Normal file
31
tests/Json/FromXmlToJsonAndBackTest.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
namespace PSC\Library\Calc\Tests\Json;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use PSC\Library\Calc\Engine;
|
||||||
|
use PSC\Library\Calc\Option\Type\Input;
|
||||||
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
|
class FromXmlToJsonAndBackTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testConvertComplexCalcBackAndForth()
|
||||||
|
{
|
||||||
|
$engine1 = new Engine();
|
||||||
|
|
||||||
|
self::assertTrue($engine1->loadString(file_get_contents(__DIR__.'/from1.xml')));
|
||||||
|
|
||||||
|
$tempXML = tempnam(sys_get_temp_dir(), 'calc');
|
||||||
|
$tempJson = tempnam(sys_get_temp_dir(), 'calc');
|
||||||
|
|
||||||
|
file_put_contents($tempJson, $engine1->generateJson());
|
||||||
|
$engine2 = new Engine();
|
||||||
|
self::assertTrue($engine2->loadJson(file_get_contents($tempJson)));
|
||||||
|
|
||||||
|
file_put_contents($tempXML, $engine2->generateXML());
|
||||||
|
|
||||||
|
self::assertXmlFileEqualsXmlFile(__DIR__ .'/from1.xml', $tempXML);
|
||||||
|
|
||||||
|
@unlink($tempXML);
|
||||||
|
@unlink($tempJson);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1 +1 @@
|
|||||||
[{"uuid":"df2df718-b28e-482d-bf0c-67d246f05d32","name":"Test Artikel","options":[{"id":"auflage","type":2,"dependencys":[],"placeHolder":"Placeholder","default":"100","name":"Auflage","required":false},{"id":"seiten_umschlag","type":2,"dependencys":[],"placeHolder":"Placeholder","default":"2","name":"Seiten Umschlag","required":false},{"id":"seiten_anzahl_inhalt","type":2,"dependencys":[{"formula":"","relation":"auflage","borders":[{"formula":"$Vauflage$V*0.12","calcValue":"","flatRate":"","value":"1-10","dependencys":[{"formula":"","relation":"seiten_umschlag","borders":[{"formula":"$Vseiten_umschlag$V*0.24","calcValue":"","flatRate":"","value":"1-2","dependencys":[]},{"formula":"$Vseiten_umschlag$V*0.23","calcValue":"","flatRate":"","value":"3-","dependencys":[]}]}]},{"formula":"$Vauflage$V*0.11","calcValue":"","flatRate":"","value":"11-","dependencys":[{"formula":"","relation":"seiten_umschlag","borders":[{"formula":"$Vseiten_umschlag$V*0.21","calcValue":"","flatRate":"","value":"1-2","dependencys":[]},{"formula":"$Vseiten_umschlag$V*0.20","calcValue":"","flatRate":"","value":"3-","dependencys":[]}]}]}]}],"placeHolder":"Placeholder","default":"10","name":"Seiten Anzahl Inhalt","required":true},{"id":"farbigkeit","mode":"normal","type":3,"dependencys":[],"default":"10","options":[{"id":"10","name":"1/0 farbig","dependencys":[{"formula":"","relation":"auflage","borders":[{"formula":"","calcValue":"","flatRate":"","value":"1-101","dependencys":[]}]}]},{"id":"11","name":"1/1 farbig","dependencys":[]},{"id":"20","name":"2/0 farbig","dependencys":[]},{"id":"21","name":"2/1 farbig","dependencys":[]},{"id":"22","name":"2/2 farbig","dependencys":[{"formula":"","relation":"auflage","borders":[{"formula":"","calcValue":"","flatRate":"","value":"11-50","dependencys":[]}]}]}],"name":"Farbigkeit"},{"id":"calc","type":1,"dependencys":[{"formula":"","relation":"auflage","borders":[{"formula":"$Vauflage$V*$Vseiten_anzahl_inhalt$V","calcValue":"","flatRate":"","value":"1-","dependencys":[]}]}],"default":"","name":"calc"}]}]
|
[{"uuid":"df2df718-b28e-482d-bf0c-67d246f05d32","name":"Test Artikel","options":[{"id":"auflage","name":"Auflage","default":"100","dependencys":[],"placeHolder":"Placeholder","required":false,"type":2},{"id":"seiten_umschlag","name":"Seiten Umschlag","default":"2","dependencys":[],"placeHolder":"Placeholder","required":false,"type":2},{"id":"seiten_anzahl_inhalt","name":"Seiten Anzahl Inhalt","default":"10","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vauflage$V*0.12","price":0,"value":"1-10","dependencys":[{"relation":"seiten_umschlag","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vseiten_umschlag$V*0.24","price":0,"value":"1-2","dependencys":[]},{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vseiten_umschlag$V*0.23","price":0,"value":"3-","dependencys":[]}]}]},{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vauflage$V*0.11","price":0,"value":"11-","dependencys":[{"relation":"seiten_umschlag","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vseiten_umschlag$V*0.21","price":0,"value":"1-2","dependencys":[]},{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vseiten_umschlag$V*0.20","price":0,"value":"3-","dependencys":[]}]}]}]}],"placeHolder":"Placeholder","required":true,"type":2},{"id":"farbigkeit","name":"Farbigkeit","default":"10","dependencys":[],"type":3,"options":[{"id":"10","name":"1\/0 farbig","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"","price":0,"value":"1-101","dependencys":[]}]}]},{"id":"11","name":"1\/1 farbig","dependencys":[]},{"id":"20","name":"2\/0 farbig","dependencys":[]},{"id":"21","name":"2\/1 farbig","dependencys":[]},{"id":"22","name":"2\/2 farbig","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"","price":0,"value":"11-50","dependencys":[]}]}]}],"mode":"normal"},{"id":"calc","name":"calc","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vauflage$V*$Vseiten_anzahl_inhalt$V","price":0,"value":"1-","dependencys":[]}]}],"type":1}]}]
|
||||||
@ -5,9 +5,10 @@
|
|||||||
<uuid>df2df718-b28e-482d-bf0c-67d246f05d32</uuid>
|
<uuid>df2df718-b28e-482d-bf0c-67d246f05d32</uuid>
|
||||||
<kommentar></kommentar>
|
<kommentar></kommentar>
|
||||||
|
|
||||||
<option id="auflage" name="Auflage" type="Input" placeholder="Placeholder" default="100" require="false"></option>
|
<option id="auflage" name="Auflage" type="Input" placeholder="Placeholder" default="100"></option>
|
||||||
|
|
||||||
|
<option id="seiten_umschlag" name="Seiten Umschlag" type="Input" default="2" placeholder="Placeholder"></option>
|
||||||
|
|
||||||
<option id="seiten_umschlag" name="Seiten Umschlag" type="Input" default="2" require="false" placeholder="Placeholder"></option>
|
|
||||||
|
|
||||||
<option id="seiten_anzahl_inhalt" name="Seiten Anzahl Inhalt" type="Input" default="10" require="true" placeholder="Placeholder">
|
<option id="seiten_anzahl_inhalt" name="Seiten Anzahl Inhalt" type="Input" default="10" require="true" placeholder="Placeholder">
|
||||||
<auflage>
|
<auflage>
|
||||||
|
|||||||
68
tests/Json/from1.xml
Normal file
68
tests/Json/from1.xml
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<kalkulation>
|
||||||
|
<artikel>
|
||||||
|
<name>Test Artikel</name>
|
||||||
|
<uuid>df2df718-b28e-482d-bf0c-67d246f05d32</uuid>
|
||||||
|
<kommentar></kommentar>
|
||||||
|
|
||||||
|
<option id="auflage" name="Auflage" type="Input" placeholder="Placeholder" default="100"></option>
|
||||||
|
|
||||||
|
<option id="startkosten_1c" name="Startkosten 1C" type="Hidden" default="1">
|
||||||
|
<farbigkeit_inhalt>
|
||||||
|
<!-- einfarbiger Inhalt -->
|
||||||
|
<grenze value="1">
|
||||||
|
<format1>
|
||||||
|
<grenze value="1-5">
|
||||||
|
<papier_inhalt>
|
||||||
|
<!-- 52g Papier -->
|
||||||
|
<grenze value="1">
|
||||||
|
|
||||||
|
<seitenzahl_inhalt>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_80$P">80</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_96$P">96</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_112$P">112</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_128$P">128</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_144$P">144</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_160$P">160</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_176$P">176</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_192$P">192</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_208$P">208</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_224$P">224</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_240$P">240</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_256$P">256</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_272$P">272</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_288$P">288</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_304$P">304</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_320$P">320</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_336$P">336</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_352$P">352</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_368$P">368</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_384$P">384</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_400$P">400</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_416$P">416</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_432$P">432</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_448$P">448</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_464$P">464</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_480$P">480</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_496$P">496</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_512$P">512</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_528$P">528</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_544$P">544</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_560$P">560</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_576$P">576</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_592$P">592</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_608$P">608</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_624$P">624</grenze>
|
||||||
|
<grenze formel="$Pstartpreis_format1_52g_640$P">640</grenze>
|
||||||
|
</seitenzahl_inhalt>
|
||||||
|
|
||||||
|
</grenze>
|
||||||
|
</papier_inhalt>
|
||||||
|
</grenze>
|
||||||
|
</format1>
|
||||||
|
</grenze>
|
||||||
|
</farbigkeit_inhalt>
|
||||||
|
</option>
|
||||||
|
</artikel>
|
||||||
|
</kalkulation>
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user