Add Weight
This commit is contained in:
parent
a6b64ab08b
commit
83cd932a89
1
.phpunit.result.cache
Normal file
1
.phpunit.result.cache
Normal file
File diff suppressed because one or more lines are too long
@ -17,8 +17,7 @@
|
|||||||
"doctrine/orm": "^2.5"
|
"doctrine/orm": "^2.5"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^5",
|
"phpunit/phpunit": "^9",
|
||||||
"phpunit/php-code-coverage": "^4",
|
"phpunit/php-code-coverage": "^9"
|
||||||
"phpstan/phpstan": "^0.11.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2748
composer.lock
generated
2748
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,6 @@
|
|||||||
convertWarningsToExceptions = "true"
|
convertWarningsToExceptions = "true"
|
||||||
processIsolation = "true"
|
processIsolation = "true"
|
||||||
stopOnFailure = "false"
|
stopOnFailure = "false"
|
||||||
syntaxCheck = "true"
|
|
||||||
bootstrap = "vendor/autoload.php" >
|
bootstrap = "vendor/autoload.php" >
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
|
|||||||
@ -129,7 +129,7 @@ class Calc
|
|||||||
|
|
||||||
if($edge->getFormel() != "") {
|
if($edge->getFormel() != "") {
|
||||||
$formel = $this->formelCalc->parse($edge->getFormel());
|
$formel = $this->formelCalc->parse($edge->getFormel());
|
||||||
if ($formel != "" && $option->getId() != 'weight' && !$option->isAjaxExport() && !$option->isDisplayOnly() && $option->isAmount()) {
|
if ($formel != "" && !in_array($option->getId(), ['weight', 'weight_single']) && !$option->isAjaxExport() && !$option->isDisplayOnly() && $option->isAmount()) {
|
||||||
$p = 0;
|
$p = 0;
|
||||||
$formel = str_replace("tonumber", '$this->toNumber', $formel);
|
$formel = str_replace("tonumber", '$this->toNumber', $formel);
|
||||||
|
|
||||||
@ -147,20 +147,32 @@ class Calc
|
|||||||
|
|
||||||
$this->engine->setVariable('price', $gesamt);
|
$this->engine->setVariable('price', $gesamt);
|
||||||
}
|
}
|
||||||
if ($formel != "" && $option->getId() != 'weight' && $option->isAjaxExport() && !$option->isDisplayOnly() && $option->isAmount()) {
|
if ($formel != "" && !in_array($option->getId(), ['weight', 'weight_single']) && $option->isAjaxExport() && !$option->isDisplayOnly() && $option->isAmount()) {
|
||||||
$p = 0;
|
$p = 0;
|
||||||
$formel = str_replace("tonumber", '$this->toNumber', $formel);
|
$formel = str_replace("tonumber", '$this->toNumber', $formel);
|
||||||
eval('@$p = ' . $formel . ';');
|
eval('@$p = ' . $formel . ';');
|
||||||
|
|
||||||
$this->engine->addAjaxVariable($option->getId(), $p);
|
$this->engine->addAjaxVariable($option->getId(), $p);
|
||||||
}
|
}
|
||||||
if ($formel != "" && $option->getId() != 'weight' && !$option->isAjaxExport() && $option->isDisplayOnly() && $option->isAmount()) {
|
if ($formel != "" && !in_array($option->getId(), ['weight', 'weight_single']) && !$option->isAjaxExport() && $option->isDisplayOnly() && $option->isAmount()) {
|
||||||
$p = 0;
|
$p = 0;
|
||||||
$formel = str_replace("tonumber", '$this->toNumber', $formel);
|
$formel = str_replace("tonumber", '$this->toNumber', $formel);
|
||||||
eval('@$p = ' . $formel . ';');
|
eval('@$p = ' . $formel . ';');
|
||||||
|
|
||||||
$this->engine->addDisplayVariable($option->getId(), $p);
|
$this->engine->addDisplayVariable($option->getId(), $p);
|
||||||
}
|
}
|
||||||
|
if($formel != "" && $option->getId() == "weight_single") {
|
||||||
|
$p = 0;
|
||||||
|
$formel = str_replace("tonumber", '$this->toNumber', $formel);
|
||||||
|
eval('@$p = ' . $formel . ';');
|
||||||
|
$this->engine->setWeightSingle($p);
|
||||||
|
}
|
||||||
|
if($formel != "" && $option->getId() == "weight") {
|
||||||
|
$p = 0;
|
||||||
|
$formel = str_replace("tonumber", '$this->toNumber', $formel);
|
||||||
|
eval('@$p = ' . $formel . ';');
|
||||||
|
$this->engine->setWeight($p);
|
||||||
|
}
|
||||||
if(!$option->isAmount()) {
|
if(!$option->isAmount()) {
|
||||||
$p = 0;
|
$p = 0;
|
||||||
$formel = str_replace("tonumber", '$this->toNumber', $formel);
|
$formel = str_replace("tonumber", '$this->toNumber', $formel);
|
||||||
|
|||||||
@ -58,6 +58,9 @@ class Engine
|
|||||||
/** @var float */
|
/** @var float */
|
||||||
protected $price = 0;
|
protected $price = 0;
|
||||||
|
|
||||||
|
protected float $weight = 0;
|
||||||
|
|
||||||
|
protected float $weightSingle = 0;
|
||||||
/** @var float */
|
/** @var float */
|
||||||
protected $tax = 0;
|
protected $tax = 0;
|
||||||
|
|
||||||
@ -537,4 +540,30 @@ class Engine
|
|||||||
{
|
{
|
||||||
$this->displayVariables[$key] = $value;
|
$this->displayVariables[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setWeight(float $var): void
|
||||||
|
{
|
||||||
|
$this->weight = $var;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getWeight(): float
|
||||||
|
{
|
||||||
|
if($this->dirty) {
|
||||||
|
$this->calc();
|
||||||
|
}
|
||||||
|
return $this->weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setWeightSingle(float $var): void
|
||||||
|
{
|
||||||
|
$this->weightSingle = $var;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getWeightSingle(): float
|
||||||
|
{
|
||||||
|
if($this->dirty) {
|
||||||
|
$this->calc();
|
||||||
|
}
|
||||||
|
return $this->weightSingle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
204
test.xml
Normal file
204
test.xml
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
<?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>
|
||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Article;
|
namespace PSC\Library\Calc\Tests\Article;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\Option\Type\Select;
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
@ -8,7 +9,7 @@ use PSC\Library\Calc\PaperContainer;
|
|||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalendarXmlTest extends \PHPUnit_Framework_TestCase
|
class CalendarXmlTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfArticleCountInXmlCorrect()
|
public function testIfArticleCountInXmlCorrect()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,21 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Article;
|
namespace PSC\Library\Calc\Tests\Article;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class Complete1Test extends \PHPUnit_Framework_TestCase
|
class Complete1Test extends TestCase
|
||||||
{
|
{
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$this->engine = new Engine(new Container());
|
$this->engine = new Engine(new Container());
|
||||||
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/General/complete1.xml'));
|
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/General/complete1.xml'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Article;
|
namespace PSC\Library\Calc\Tests\Article;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class SimpleXmlTest extends \PHPUnit_Framework_TestCase
|
class SimpleXmlTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfArticleCountInXmlCorrect()
|
public function testIfArticleCountInXmlCorrect()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,23 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Calc;
|
namespace PSC\Library\Calc\Tests\Calc;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\Option\Type\Base;
|
use PSC\Library\Calc\Option\Type\Base;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class OptionsRemoveTest extends \PHPUnit_Framework_TestCase
|
class OptionsRemoveTest extends TestCase
|
||||||
{
|
{
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$this->engine = new Engine(new Container());
|
$this->engine = new Engine(new Container());
|
||||||
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/Calc/option_remove.xml'));
|
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/Calc/option_remove.xml'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,24 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Calc;
|
namespace PSC\Library\Calc\Tests\Calc;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\Option\Type\Base;
|
use PSC\Library\Calc\Option\Type\Base;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class PreisPauschaleTest extends \PHPUnit_Framework_TestCase
|
class PreisPauschaleTest extends TestCase
|
||||||
{
|
{
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$this->engine = new Engine(new Container());
|
$this->engine = new Engine(new Container());
|
||||||
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/Calc/pauschale_preis.xml'));
|
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/Calc/pauschale_preis.xml'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,24 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Calc;
|
namespace PSC\Library\Calc\Tests\Calc;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\Option\Type\Base;
|
use PSC\Library\Calc\Option\Type\Base;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class PriceMinTest extends \PHPUnit_Framework_TestCase
|
class PriceMinTest extends TestCase
|
||||||
{
|
{
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$this->engine = new Engine(new Container());
|
$this->engine = new Engine(new Container());
|
||||||
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/Calc/price_min.xml'));
|
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/Calc/price_min.xml'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,21 +2,22 @@
|
|||||||
|
|
||||||
namespace PSC\Library\Calc\Tests\CalcValue;
|
namespace PSC\Library\Calc\Tests\CalcValue;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class AddCalcValuesTest extends \PHPUnit_Framework_TestCase
|
class AddCalcValuesTest extends TestCase
|
||||||
{
|
{
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$this->engine = new Engine(new Container());
|
$this->engine = new Engine(new Container());
|
||||||
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/CalcValue/addcalcvalues.xml'));
|
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/CalcValue/addcalcvalues.xml'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\CalcValue;
|
namespace PSC\Library\Calc\Tests\CalcValue;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\Option\Type\PaperDbSelect;
|
use PSC\Library\Calc\Option\Type\PaperDbSelect;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class ComplexTest extends \PHPUnit_Framework_TestCase
|
class ComplexTest extends TestCase
|
||||||
{
|
{
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -27,17 +28,17 @@ class ComplexTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->engine->setParameters(file_get_contents(__DIR__.'/../TestFiles/parameters.txt'));
|
$this->engine->setParameters(file_get_contents(__DIR__.'/../TestFiles/parameters.txt'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfParseValue()
|
public function testIfParseValue(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(28.54, $this->engine->getPrice());
|
$this->assertEquals(28.54, $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfPaperGrammaturValue()
|
public function testIfPaperGrammaturValue(): void
|
||||||
{
|
{
|
||||||
$this->assertInstanceOf(PaperDbSelect::Class, $this->engine->getArticle()->getOptionById('papier'));
|
$this->assertInstanceOf(PaperDbSelect::Class, $this->engine->getArticle()->getOptionById('papier'));
|
||||||
|
|
||||||
|
|||||||
@ -1,26 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\CalcValue;
|
namespace PSC\Library\Calc\Tests\CalcValue;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class SimpleTest extends \PHPUnit_Framework_TestCase
|
class SimpleTest extends TestCase
|
||||||
{
|
{
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$this->engine = new Engine(new Container());
|
$this->engine = new Engine(new Container());
|
||||||
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/CalcValue/simple.xml'));
|
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/CalcValue/simple.xml'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfParseValue()
|
public function testIfParseValue(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(20, $this->engine->getPrice());
|
$this->assertEquals(20, $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|||||||
52
tests/Complex/EightTest.php
Normal file
52
tests/Complex/EightTest.php
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
namespace PSC\Library\Calc\Tests\Complex;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use PSC\Library\Calc\Article;
|
||||||
|
use PSC\Library\Calc\Engine;
|
||||||
|
use PSC\Library\Calc\PaperContainer;
|
||||||
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
|
class EightTest extends TestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
/** @var Engine */
|
||||||
|
protected $engine = null;
|
||||||
|
|
||||||
|
public function setUp(): void
|
||||||
|
{
|
||||||
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
|
$paperContainer = new PaperContainer();
|
||||||
|
$paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . '/../TestFiles/Complex/papierContainer.xml')));
|
||||||
|
|
||||||
|
$this->engine = new Engine();
|
||||||
|
$this->engine->setPaperContainer($paperContainer);
|
||||||
|
$this->engine->setPaperRepository($repository);
|
||||||
|
$this->engine->setFormulas(file_get_contents(__DIR__.'/../TestFiles/Complex/formels.txt'));
|
||||||
|
$this->engine->setParameters(file_get_contents(__DIR__.'/../TestFiles/Complex/parameters.txt'));
|
||||||
|
|
||||||
|
$this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/Complex/weight.xml'));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDown(): void
|
||||||
|
{
|
||||||
|
$this->engine = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testIfWeightIsCorrect(): void
|
||||||
|
{
|
||||||
|
$this->assertEquals(25, $this->engine->getWeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testIfSingleWeightIsCorrect(): void
|
||||||
|
{
|
||||||
|
$this->assertEquals(2.5, $this->engine->getWeightSingle());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testIfDefaultPriceIsOk(): void
|
||||||
|
{
|
||||||
|
$this->assertEquals(20, $this->engine->getPrice());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,20 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Complex;
|
namespace PSC\Library\Calc\Tests\Complex;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class FirstTest extends \PHPUnit_Framework_TestCase
|
class FirstTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,17 +30,17 @@ class FirstTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfArticleCountIsCorrect()
|
public function testIfArticleCountIsCorrect(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(162.19, $this->engine->getPrice());
|
$this->assertEquals(162.19, $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,20 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Complex;
|
namespace PSC\Library\Calc\Tests\Complex;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class FiveTest extends \PHPUnit_Framework_TestCase
|
class FiveTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,17 +30,17 @@ class FiveTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfArticleCountIsCorrect()
|
public function testIfArticleCountIsCorrect(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('auflage', '10000');
|
$this->engine->setVariable('auflage', '10000');
|
||||||
$this->assertEquals(4204.00 , $this->engine->getPrice());
|
$this->assertEquals(4204.00 , $this->engine->getPrice());
|
||||||
|
|||||||
@ -1,20 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Complex;
|
namespace PSC\Library\Calc\Tests\Complex;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class FourTest extends \PHPUnit_Framework_TestCase
|
class FourTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,17 +30,17 @@ class FourTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfArticleCountIsCorrect()
|
public function testIfArticleCountIsCorrect(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(152.00 , $this->engine->getPrice());
|
$this->assertEquals(152.00 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,20 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Complex;
|
namespace PSC\Library\Calc\Tests\Complex;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class PaperSavedTest extends \PHPUnit_Framework_TestCase
|
class PaperSavedTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,17 +30,17 @@ class PaperSavedTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfArticleCountIsCorrect()
|
public function testIfArticleCountIsCorrect(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('papier', 'INM137');
|
$this->engine->setVariable('papier', 'INM137');
|
||||||
|
|
||||||
|
|||||||
@ -1,20 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Complex;
|
namespace PSC\Library\Calc\Tests\Complex;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class SecondTest extends \PHPUnit_Framework_TestCase
|
class SecondTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,17 +30,17 @@ class SecondTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfArticleCountIsCorrect()
|
public function testIfArticleCountIsCorrect(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(328.53 , $this->engine->getPrice());
|
$this->assertEquals(328.53 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Complex;
|
namespace PSC\Library\Calc\Tests\Complex;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class SixTest extends \PHPUnit_Framework_TestCase
|
class SixTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -29,23 +30,23 @@ class SixTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfArticleCountIsCorrect()
|
public function testIfArticleCountIsCorrect(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfSelectedOptionsCorrect()
|
public function testIfSelectedOptionsCorrect(): void
|
||||||
{
|
{
|
||||||
$this->engine->getPrice();
|
$this->engine->getPrice();
|
||||||
$this->assertEquals(37500 , $this->engine->getPrice());
|
$this->assertEquals(37500 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfCalcCorrect()
|
public function testIfCalcCorrect(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('size', ['a3q','a4q']);
|
$this->engine->setVariable('size', ['a3q','a4q']);
|
||||||
$this->engine->getPrice();
|
$this->engine->getPrice();
|
||||||
|
|||||||
@ -1,20 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Complex;
|
namespace PSC\Library\Calc\Tests\Complex;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class ThirdTest extends \PHPUnit_Framework_TestCase
|
class ThirdTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,17 +30,17 @@ class ThirdTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfArticleCountIsCorrect()
|
public function testIfArticleCountIsCorrect(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('auflage', 1500);
|
$this->engine->setVariable('auflage', 1500);
|
||||||
$this->engine->setVariable('druckfarben_inhalt', 2);
|
$this->engine->setVariable('druckfarben_inhalt', 2);
|
||||||
|
|||||||
@ -1,20 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\A;
|
namespace PSC\Library\Calc\Tests\Customer\A;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -32,22 +31,22 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(229.86 , $this->engine->getPrice());
|
$this->assertEquals(229.86 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testVariant1()
|
public function testVariant1(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('falzbrueche', 14);
|
$this->engine->setVariable('falzbrueche', 14);
|
||||||
$this->assertEquals(292.78 , $this->engine->getPrice());
|
$this->assertEquals(292.78 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
public function testVariant2()
|
public function testVariant2(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('falzbrueche', 14);
|
$this->engine->setVariable('falzbrueche', 14);
|
||||||
$this->engine->setVariable('druckfarben_inhalt', 8);
|
$this->engine->setVariable('druckfarben_inhalt', 8);
|
||||||
|
|||||||
@ -1,20 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\B;
|
namespace PSC\Library\Calc\Tests\Customer\B;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -32,12 +31,12 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(945.00, $this->engine->getPrice());
|
$this->assertEquals(945.00, $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\C;
|
namespace PSC\Library\Calc\Tests\Customer\C;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -30,23 +31,23 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(467.89 , $this->engine->getPrice());
|
$this->assertEquals(467.89 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Variant1()
|
public function Variant1(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('seiten_umschlag', 0);
|
$this->engine->setVariable('seiten_umschlag', 0);
|
||||||
$price = $this->engine->getPrice();
|
$price = $this->engine->getPrice();
|
||||||
$this->assertEquals(356.46 , $price);
|
$this->assertEquals(356.46 , $price);
|
||||||
}
|
}
|
||||||
public function Variant2()
|
public function Variant2(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('seiten_umschlag', 0);
|
$this->engine->setVariable('seiten_umschlag', 0);
|
||||||
$this->engine->setVariable('aufschlag', 50);
|
$this->engine->setVariable('aufschlag', 50);
|
||||||
|
|||||||
@ -1,18 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\D;
|
namespace PSC\Library\Calc\Tests\Customer\D;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -30,12 +31,12 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(28.88 , $this->engine->getPrice());
|
$this->assertEquals(28.88 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\E;
|
namespace PSC\Library\Calc\Tests\Customer\E;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -30,17 +31,17 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(33 , $this->engine->getPrice());
|
$this->assertEquals(33 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfAnwender2PriceIsOk()
|
public function testIfAnwender2PriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable("anz_user", 2);
|
$this->engine->setVariable("anz_user", 2);
|
||||||
$this->assertEquals(102 , $this->engine->getPrice());
|
$this->assertEquals(102 , $this->engine->getPrice());
|
||||||
|
|||||||
@ -1,18 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\F;
|
namespace PSC\Library\Calc\Tests\Customer\F;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -30,23 +31,23 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(103.80 , $this->engine->getPrice());
|
$this->assertEquals(103.80 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfOtherPriceIsOk()
|
public function testIfOtherPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable("papierum2", "10080");
|
$this->engine->setVariable("papierum2", "10080");
|
||||||
$this->assertEquals(105.53 , $this->engine->getPrice());
|
$this->assertEquals(105.53 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfOtherPrice2IsOk()
|
public function testIfOtherPrice2IsOk(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable("papierum2", "10080");
|
$this->engine->setVariable("papierum2", "10080");
|
||||||
$this->engine->setVariable("druckum2", "40fschluss");
|
$this->engine->setVariable("druckum2", "40fschluss");
|
||||||
|
|||||||
@ -1,18 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\G;
|
namespace PSC\Library\Calc\Tests\Customer\G;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -30,23 +31,23 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(10.49 , $this->engine->getPrice());
|
$this->assertEquals(10.49 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDisplayValues()
|
public function testIfDisplayValues(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(10.49 , $this->engine->getPrice());
|
$this->assertEquals(10.49 , $this->engine->getPrice());
|
||||||
$this->assertCount(1 , $this->engine->getDisplayVariables());
|
$this->assertCount(1 , $this->engine->getDisplayVariables());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfAjaxValues()
|
public function testIfAjaxValues(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(10.49 , $this->engine->getPrice());
|
$this->assertEquals(10.49 , $this->engine->getPrice());
|
||||||
$this->assertCount(1 , $this->engine->getDisplayVariables());
|
$this->assertCount(1 , $this->engine->getDisplayVariables());
|
||||||
|
|||||||
@ -1,18 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\H;
|
namespace PSC\Library\Calc\Tests\Customer\H;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -30,23 +31,23 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(33 , $this->engine->getPrice());
|
$this->assertEquals(33 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDisplayValues()
|
public function testIfDisplayValues(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(33 , $this->engine->getPrice());
|
$this->assertEquals(33 , $this->engine->getPrice());
|
||||||
$this->assertCount(0 , $this->engine->getDisplayVariables());
|
$this->assertCount(0 , $this->engine->getDisplayVariables());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfAjaxValues()
|
public function testIfAjaxValues(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('sap_plugin', 1);
|
$this->engine->setVariable('sap_plugin', 1);
|
||||||
$this->assertEquals(258 , $this->engine->getPrice());
|
$this->assertEquals(258 , $this->engine->getPrice());
|
||||||
|
|||||||
@ -1,18 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\I;
|
namespace PSC\Library\Calc\Tests\Customer\I;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -30,23 +31,23 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(100.99 , $this->engine->getPrice());
|
$this->assertEquals(100.99 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIf6000PriceIsOk()
|
public function testIf6000PriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('auflage', 6000);
|
$this->engine->setVariable('auflage', 6000);
|
||||||
$this->assertEquals(132.05 , $this->engine->getPrice());
|
$this->assertEquals(132.05 , $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDruckfarbenPriceIsOk()
|
public function testIfDruckfarbenPriceIsOk(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('auflage', 6000);
|
$this->engine->setVariable('auflage', 6000);
|
||||||
$this->engine->setVariable('druckfarben_inhalt', 3);
|
$this->engine->setVariable('druckfarben_inhalt', 3);
|
||||||
|
|||||||
@ -1,19 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\J;
|
namespace PSC\Library\Calc\Tests\Customer\J;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\Option\Type\Select;
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,12 +32,12 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk()
|
public function testIfDefaultPriceIsOk(): void
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Select $option */
|
/** @var Select $option */
|
||||||
|
|||||||
@ -1,19 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\K;
|
namespace PSC\Library\Calc\Tests\Customer\K;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\Option\Type\Select;
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,15 +32,17 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCalcPlan()
|
public function testCalcPlan(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('anz_ausfuhren', 2500);
|
$this->engine->setVariable('anz_ausfuhren', 2500);
|
||||||
/** @var Select $option */
|
/** @var Select $option */
|
||||||
$option = $this->engine->getArticle()->getOptionById('tarif');
|
$option = $this->engine->getArticle()->getOptionById('tarif');
|
||||||
|
|
||||||
|
$this->assertSame("Basic", $option->getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,19 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\L;
|
namespace PSC\Library\Calc\Tests\Customer\L;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\Option\Type\Select;
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,19 +32,19 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCalcPlan()
|
public function testCalcPlan(): void
|
||||||
{
|
{
|
||||||
$article = $this->engine->getArticle();
|
$article = $this->engine->getArticle();
|
||||||
$option = $article->getOptionById('kalender_typ2');
|
$option = $article->getOptionById('kalender_typ2');
|
||||||
$this->assertEquals("BASIC, PERFORMANCE", $option->getValue());
|
$this->assertEquals("BASIC, PERFORMANCE", $option->getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCalcVarPlan()
|
public function testCalcVarPlan(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('kalender_typ2', ["1", "4"]);
|
$this->engine->setVariable('kalender_typ2', ["1", "4"]);
|
||||||
$article = $this->engine->getArticle();
|
$article = $this->engine->getArticle();
|
||||||
|
|||||||
@ -1,19 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\M;
|
namespace PSC\Library\Calc\Tests\Customer\M;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\Option\Type\Select;
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,19 +32,19 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDefaultOption()
|
public function testDefaultOption(): void
|
||||||
{
|
{
|
||||||
$article = $this->engine->getArticle();
|
$article = $this->engine->getArticle();
|
||||||
$option = $article->getOptionById('lochbohrung');
|
$option = $article->getOptionById('lochbohrung');
|
||||||
$this->assertEquals("ohne Lochbohrung", $option->getValue());
|
$this->assertEquals("ohne Lochbohrung", $option->getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCalcValues()
|
public function testCalcValues(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('lochbohrung', 1);
|
$this->engine->setVariable('lochbohrung', 1);
|
||||||
$article = $this->engine->getArticle();
|
$article = $this->engine->getArticle();
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Customer\N;
|
namespace PSC\Library\Calc\Tests\Customer\N;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\Option\Type\Select;
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
@ -8,12 +9,12 @@ use PSC\Library\Calc\PaperContainer;
|
|||||||
use PSC\Library\Calc\PreCalc\PreCalc;
|
use PSC\Library\Calc\PreCalc\PreCalc;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class CalcTest extends \PHPUnit_Framework_TestCase
|
class CalcTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
protected ?Engine $engine;
|
protected ?Engine $engine;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ class CalcTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,40 +8,40 @@
|
|||||||
</uploads>
|
</uploads>
|
||||||
<precalc>
|
<precalc>
|
||||||
<group name="ohne Lochbohrung">
|
<group name="ohne Lochbohrung">
|
||||||
<calc name="100 stk">
|
<variant name="100 stk">
|
||||||
<auflage>100</auflage>
|
<auflage>100</auflage>
|
||||||
<lochbohrung>2</lochbohrung>
|
<lochbohrung>2</lochbohrung>
|
||||||
</calc>
|
</variant>
|
||||||
<calc name="200 stk">
|
<variant name="200 stk">
|
||||||
<auflage>200</auflage>
|
<auflage>200</auflage>
|
||||||
<lochbohrung>2</lochbohrung>
|
<lochbohrung>2</lochbohrung>
|
||||||
</calc>
|
</variant>
|
||||||
<calc name="300 stk">
|
<variant name="300 stk">
|
||||||
<auflage>300</auflage>
|
<auflage>300</auflage>
|
||||||
<lochbohrung>2</lochbohrung>
|
<lochbohrung>2</lochbohrung>
|
||||||
</calc>
|
</variant>
|
||||||
<calc name="400 stk">
|
<variant name="400 stk">
|
||||||
<auflage>400</auflage>
|
<auflage>400</auflage>
|
||||||
<lochbohrung>2</lochbohrung>
|
<lochbohrung>2</lochbohrung>
|
||||||
</calc>
|
</variant>
|
||||||
</group>
|
</group>
|
||||||
<group name="mit Lochbohrung">
|
<group name="mit Lochbohrung">
|
||||||
<calc name="100 stk">
|
<variant name="100 stk">
|
||||||
<auflage>100</auflage>
|
<auflage>100</auflage>
|
||||||
<lochbohrung>1</lochbohrung>
|
<lochbohrung>1</lochbohrung>
|
||||||
</calc>
|
</variant>
|
||||||
<calc name="200 stk">
|
<variant name="200 stk">
|
||||||
<auflage>200</auflage>
|
<auflage>200</auflage>
|
||||||
<lochbohrung>1</lochbohrung>
|
<lochbohrung>1</lochbohrung>
|
||||||
</calc>
|
</variant>
|
||||||
<calc name="300 stk">
|
<variant name="300 stk">
|
||||||
<auflage>300</auflage>
|
<auflage>300</auflage>
|
||||||
<lochbohrung>1</lochbohrung>
|
<lochbohrung>1</lochbohrung>
|
||||||
</calc>
|
</variant>
|
||||||
<calc name="400 stk">
|
<variant name="400 stk">
|
||||||
<auflage>400</auflage>
|
<auflage>400</auflage>
|
||||||
<lochbohrung>1</lochbohrung>
|
<lochbohrung>1</lochbohrung>
|
||||||
</calc>
|
</variant>
|
||||||
</group>
|
</group>
|
||||||
</precalc>
|
</precalc>
|
||||||
<option id="auflage" name="Auflage" type="Input" width="3" require="true" default="1">
|
<option id="auflage" name="Auflage" type="Input" width="3" require="true" default="1">
|
||||||
|
|||||||
48
tests/Customer/O/CalcTest.php
Normal file
48
tests/Customer/O/CalcTest.php
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
namespace PSC\Library\Calc\Tests\Customer\O;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use PSC\Library\Calc\Article;
|
||||||
|
use PSC\Library\Calc\Engine;
|
||||||
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
|
use PSC\Library\Calc\PaperContainer;
|
||||||
|
use PSC\Library\Calc\PreCalc\PreCalc;
|
||||||
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
|
class CalcTest extends TestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
protected ?Engine $engine;
|
||||||
|
|
||||||
|
public function setUp(): void
|
||||||
|
{
|
||||||
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
|
$paperContainer = new PaperContainer();
|
||||||
|
$paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . '/papierContainer.xml')));
|
||||||
|
|
||||||
|
$this->engine = new Engine();
|
||||||
|
$this->engine->setPaperContainer($paperContainer);
|
||||||
|
$this->engine->setPaperRepository($repository);
|
||||||
|
$this->engine->setFormulas(file_get_contents(__DIR__ . '/formels.txt'));
|
||||||
|
$this->engine->setParameters(file_get_contents(__DIR__ . '/parameters.txt'));
|
||||||
|
$this->engine->setTemplates(file_get_contents(__DIR__ . '/calcTemplates.xml'));
|
||||||
|
|
||||||
|
$this->engine->loadString(file_get_contents(__DIR__ . '/calc.xml'));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDown(): void
|
||||||
|
{
|
||||||
|
$this->engine = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testPreCalcOption(): void
|
||||||
|
{
|
||||||
|
$article = $this->engine->getArticle();
|
||||||
|
|
||||||
|
$this->assertSame(2.00, $this->engine->getPrice());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
65
tests/Customer/O/calc.xml
Normal file
65
tests/Customer/O/calc.xml
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<kalkulation>
|
||||||
|
|
||||||
|
<artikel>
|
||||||
|
|
||||||
|
<name>DIN A2 Fotoposter</name>
|
||||||
|
|
||||||
|
<kommentar/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<option id="auflage" name="Anzahl" type="Input" default="1">
|
||||||
|
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option id="width" name="Breite in mm" type="Input" default="1000">
|
||||||
|
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option id="height" name="Höhe in mm" type="Input" default="1000">
|
||||||
|
|
||||||
|
</option>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<option id="calc_area" type="Hidden">
|
||||||
|
|
||||||
|
<auflage>
|
||||||
|
|
||||||
|
<grenze calc_value="floor($Vauflage$V*$Vwidth$V*$Vheight$V/1000000)">1-</grenze>
|
||||||
|
|
||||||
|
</auflage>
|
||||||
|
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option id="calc" type="Hidden">
|
||||||
|
|
||||||
|
<auflage formel="$CVcalc_area_auflage$CV">
|
||||||
|
|
||||||
|
<grenze formel="0">0</grenze>
|
||||||
|
|
||||||
|
<grenze formel="2">1</grenze>
|
||||||
|
|
||||||
|
<grenze formel="30">2</grenze>
|
||||||
|
|
||||||
|
<grenze formel="35">3</grenze>
|
||||||
|
|
||||||
|
<grenze formel="37">4</grenze>
|
||||||
|
|
||||||
|
<grenze formel="41">5-6</grenze>
|
||||||
|
|
||||||
|
<grenze formel="41.5">7-9</grenze>
|
||||||
|
|
||||||
|
</auflage>
|
||||||
|
|
||||||
|
</option>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</artikel>
|
||||||
|
|
||||||
|
</kalkulation>
|
||||||
2
tests/Customer/O/calcTemplates.xml
Normal file
2
tests/Customer/O/calcTemplates.xml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<root>
|
||||||
|
</root>
|
||||||
0
tests/Customer/O/formels.txt
Normal file
0
tests/Customer/O/formels.txt
Normal file
4
tests/Customer/O/papierContainer.xml
Normal file
4
tests/Customer/O/papierContainer.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<container>
|
||||||
|
|
||||||
|
</container>
|
||||||
0
tests/Customer/O/parameters.txt
Normal file
0
tests/Customer/O/parameters.txt
Normal file
@ -1,10 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\General;
|
namespace PSC\Library\Calc\Tests\General;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class LoadTest extends \PHPUnit_Framework_TestCase
|
class LoadTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testSimpleLoadXmlFromString()
|
public function testSimpleLoadXmlFromString()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,20 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Article;
|
namespace PSC\Library\Calc\Tests\Article;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class papierDbWithFormelTest extends \PHPUnit_Framework_TestCase
|
class papierDbWithFormelTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
|
|||||||
@ -1,20 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Article;
|
namespace PSC\Library\Calc\Tests\Article;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class selectWithGrenzenTest extends \PHPUnit_Framework_TestCase
|
class selectWithGrenzenTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Parse\Edge;
|
namespace PSC\Library\Calc\Tests\Parse\Edge;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\General\Parser\EdgeCollectionContainer;
|
use PSC\Library\Calc\General\Parser\EdgeCollectionContainer;
|
||||||
|
|
||||||
class ContainerTest extends \PHPUnit_Framework_TestCase
|
class ContainerTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfLoadsCorrect()
|
public function testIfLoadsCorrect()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Parse\Edge;
|
namespace PSC\Library\Calc\Tests\Parse\Edge;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\General\Parser\Edge;
|
use PSC\Library\Calc\General\Parser\Edge;
|
||||||
|
|
||||||
class SimpleTest extends \PHPUnit_Framework_TestCase
|
class SimpleTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfOneValue()
|
public function testIfOneValue()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Option\Type;
|
namespace PSC\Library\Calc\Tests\Option\Type;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Option\Parser;
|
use PSC\Library\Calc\Option\Parser;
|
||||||
use PSC\Library\Calc\Option\Type\Checkbox;
|
use PSC\Library\Calc\Option\Type\Checkbox;
|
||||||
use PSC\Library\Calc\Option\Type\Input;
|
use PSC\Library\Calc\Option\Type\Input;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class CheckboxTest extends \PHPUnit_Framework_TestCase
|
class CheckboxTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfCorrectType()
|
public function testIfCorrectType()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Option\Type;
|
namespace PSC\Library\Calc\Tests\Option\Type;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Option\Parser;
|
use PSC\Library\Calc\Option\Parser;
|
||||||
use PSC\Library\Calc\Option\Type\Input;
|
use PSC\Library\Calc\Option\Type\Input;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class InputTest extends \PHPUnit_Framework_TestCase
|
class InputTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfCorrectType()
|
public function testIfCorrectType()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Option\Type;
|
namespace PSC\Library\Calc\Tests\Option\Type;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Option\Parser;
|
use PSC\Library\Calc\Option\Parser;
|
||||||
use PSC\Library\Calc\Option\Type\Checkbox;
|
use PSC\Library\Calc\Option\Type\Checkbox;
|
||||||
use PSC\Library\Calc\Option\Type\Input;
|
use PSC\Library\Calc\Option\Type\Input;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class RadioboxTest extends \PHPUnit_Framework_TestCase
|
class RadioboxTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfCorrectType()
|
public function testIfCorrectType()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Option\Type;
|
namespace PSC\Library\Calc\Tests\Option\Type;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Option\Parser;
|
use PSC\Library\Calc\Option\Parser;
|
||||||
use PSC\Library\Calc\Option\Type\Select;
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class SelectTest extends \PHPUnit_Framework_TestCase
|
class SelectTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfCorrectType()
|
public function testIfCorrectType()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Option\Type;
|
namespace PSC\Library\Calc\Tests\Option\Type;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Option\Parser;
|
use PSC\Library\Calc\Option\Parser;
|
||||||
use PSC\Library\Calc\Option\Type\Input;
|
use PSC\Library\Calc\Option\Type\Input;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class TextTest extends \PHPUnit_Framework_TestCase
|
class TextTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfCorrectType()
|
public function testIfCorrectType()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\Option\Type;
|
namespace PSC\Library\Calc\Tests\Option\Type;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Option\Parser;
|
use PSC\Library\Calc\Option\Parser;
|
||||||
use PSC\Library\Calc\Option\Type\Input;
|
use PSC\Library\Calc\Option\Type\Input;
|
||||||
use PSC\Library\Calc\PaperContainer\Container;
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
class TextareaTest extends \PHPUnit_Framework_TestCase
|
class TextareaTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfCorrectType()
|
public function testIfCorrectType()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\PreCalc;
|
namespace PSC\Library\Calc\Tests\PreCalc;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\PreCalc\Group as PSCGroup;
|
use PSC\Library\Calc\PreCalc\Group as PSCGroup;
|
||||||
use PSC\Library\Calc\PreCalc\Parser\Group;
|
use PSC\Library\Calc\PreCalc\Parser\Group;
|
||||||
|
|
||||||
class ParseGroupTest extends \PHPUnit_Framework_TestCase
|
class ParseGroupTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfCorrectType()
|
public function testIfCorrectType()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\PreCalc;
|
namespace PSC\Library\Calc\Tests\PreCalc;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\PreCalc\Parser\PreCalc;
|
use PSC\Library\Calc\PreCalc\Parser\PreCalc;
|
||||||
use PSC\Library\Calc\PreCalc\PreCalc as PSCPreCalc;
|
use PSC\Library\Calc\PreCalc\PreCalc as PSCPreCalc;
|
||||||
|
|
||||||
class ParseTest extends \PHPUnit_Framework_TestCase
|
class ParseTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfCorrectType()
|
public function testIfCorrectType()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\PreCalc;
|
namespace PSC\Library\Calc\Tests\PreCalc;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\PreCalc\Parser\Variant;
|
use PSC\Library\Calc\PreCalc\Parser\Variant;
|
||||||
use PSC\Library\Calc\PreCalc\Variant as PSCVariant;
|
use PSC\Library\Calc\PreCalc\Variant as PSCVariant;
|
||||||
|
|
||||||
class ParseVariantTest extends \PHPUnit_Framework_TestCase
|
class ParseVariantTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfCorrectType()
|
public function testIfCorrectType()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PSC\Library\Calc\Tests\PreCalc;
|
namespace PSC\Library\Calc\Tests\PreCalc;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\PreCalc\Parser\Value;
|
use PSC\Library\Calc\PreCalc\Parser\Value;
|
||||||
use PSC\Library\Calc\PreCalc\Value as PSCValue;
|
use PSC\Library\Calc\PreCalc\Value as PSCValue;
|
||||||
|
|
||||||
class ValueTest extends \PHPUnit_Framework_TestCase
|
class ValueTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testIfCorrectType()
|
public function testIfCorrectType()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,18 +3,19 @@ namespace PSC\Library\Calc\Tests\Recursiv;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use PSC\Library\Calc\Article;
|
use PSC\Library\Calc\Article;
|
||||||
use PSC\Library\Calc\Engine;
|
use PSC\Library\Calc\Engine;
|
||||||
use PSC\Library\Calc\PaperContainer;
|
use PSC\Library\Calc\PaperContainer;
|
||||||
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
class SecondTest extends \PHPUnit_Framework_TestCase
|
class SecondTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Engine */
|
/** @var Engine */
|
||||||
protected $engine = null;
|
protected $engine = null;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
$repository = new PaperRepostory();
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ class SecondTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
$this->engine = null;
|
$this->engine = null;
|
||||||
}
|
}
|
||||||
|
|||||||
30
tests/TestFiles/Complex/weight.xml
Normal file
30
tests/TestFiles/Complex/weight.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<kalkulation>
|
||||||
|
<artikel>
|
||||||
|
<name>Musterprodukt U4 Test</name>
|
||||||
|
<kommentar>XXX-XXXXU4</kommentar>
|
||||||
|
<!-- ### Preflight ### -->
|
||||||
|
<option id="auflage" name="Auflage" type="Input" default="10">
|
||||||
|
<auflage>
|
||||||
|
<grenze formel="$Vauflage$V*2">1-</grenze>
|
||||||
|
</auflage>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option id="calc_weight" name="weight" type="Hidden">
|
||||||
|
<auflage>
|
||||||
|
<grenze calc_value="2.5">1-</grenze>
|
||||||
|
</auflage>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option id="weight_single" name="weight" type="Hidden">
|
||||||
|
<auflage>
|
||||||
|
<grenze formel="$CVcalc_weight$CV">1-</grenze>
|
||||||
|
</auflage>
|
||||||
|
</option>
|
||||||
|
<option id="weight" name="weight" type="Hidden">
|
||||||
|
<auflage>
|
||||||
|
<grenze formel="$CVcalc_weight$CV*$Vauflage$V">1-</grenze>
|
||||||
|
</auflage>
|
||||||
|
</option>
|
||||||
|
</artikel>
|
||||||
|
</kalkulation>
|
||||||
21
tests/testTest.php
Normal file
21
tests/testTest.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PSC\Library\Calc\Tests;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use PSC\Library\Calc\Article;
|
||||||
|
use PSC\Library\Calc\Engine;
|
||||||
|
use PSC\Library\Calc\Option\Type\Base;
|
||||||
|
use PSC\Library\Calc\PaperContainer\Container;
|
||||||
|
|
||||||
|
class testTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testNotOk()
|
||||||
|
{
|
||||||
|
$this->assertFalse(false);
|
||||||
|
}
|
||||||
|
public function testOk()
|
||||||
|
{
|
||||||
|
$this->assertTrue(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user