Skip to content

Commit

Permalink
all test pass
Browse files Browse the repository at this point in the history
  • Loading branch information
lukepolo committed Jan 27, 2018
1 parent 77d67b7 commit 24e937f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 48 deletions.
95 changes: 48 additions & 47 deletions build/logs/clover.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1517081383">
<project timestamp="1517081383">
<coverage generated="1517081412">
<project timestamp="1517081412">
<package name="LukePOLO\LaraCart">
<file name="/Users/LukePOLO/PhpstormProjects/laracart/src/Cart.php">
<class name="Cart" namespace="LukePOLO\LaraCart">
Expand Down Expand Up @@ -38,7 +38,7 @@
</file>
<file name="/Users/LukePOLO/PhpstormProjects/laracart/src/CartItem.php">
<class name="CartItem" namespace="LukePOLO\LaraCart">
<metrics methods="18" coveredmethods="4" conditionals="0" coveredconditionals="0" statements="116" coveredstatements="61" elements="134" coveredelements="65"/>
<metrics methods="18" coveredmethods="5" conditionals="0" coveredconditionals="0" statements="116" coveredstatements="73" elements="134" coveredelements="78"/>
</class>
<line num="55" type="method" name="__construct" crap="2" count="1"/>
<line num="57" type="stmt" count="1"/>
Expand Down Expand Up @@ -97,12 +97,12 @@
<line num="200" type="stmt" count="1"/>
<line num="201" type="stmt" count="1"/>
<line num="202" type="stmt" count="1"/>
<line num="216" type="method" name="subTotal" crap="3.04" count="1"/>
<line num="216" type="method" name="subTotal" crap="3" count="1"/>
<line num="218" type="stmt" count="1"/>
<line num="220" type="stmt" count="1"/>
<line num="221" type="stmt" count="1"/>
<line num="224" type="stmt" count="1"/>
<line num="225" type="stmt" count="0"/>
<line num="225" type="stmt" count="1"/>
<line num="228" type="stmt" count="1"/>
<line num="240" type="method" name="subItemsTotal" crap="4.59" count="1"/>
<line num="242" type="stmt" count="1"/>
Expand All @@ -129,22 +129,22 @@
<line num="292" type="stmt" count="1"/>
<line num="293" type="stmt" count="1"/>
<line num="294" type="stmt" count="1"/>
<line num="305" type="method" name="tax" crap="69.72" count="1"/>
<line num="305" type="method" name="tax" crap="11.82" count="1"/>
<line num="307" type="stmt" count="1"/>
<line num="308" type="stmt" count="1"/>
<line num="309" type="stmt" count="1"/>
<line num="312" type="stmt" count="0"/>
<line num="312" type="stmt" count="1"/>
<line num="313" type="stmt" count="0"/>
<line num="316" type="stmt" count="0"/>
<line num="317" type="stmt" count="0"/>
<line num="318" type="stmt" count="0"/>
<line num="319" type="stmt" count="0"/>
<line num="320" type="stmt" count="0"/>
<line num="321" type="stmt" count="0"/>
<line num="324" type="stmt" count="0"/>
<line num="325" type="stmt" count="0"/>
<line num="326" type="stmt" count="0"/>
<line num="330" type="stmt" count="0"/>
<line num="316" type="stmt" count="1"/>
<line num="317" type="stmt" count="1"/>
<line num="318" type="stmt" count="1"/>
<line num="319" type="stmt" count="1"/>
<line num="320" type="stmt" count="1"/>
<line num="321" type="stmt" count="1"/>
<line num="324" type="stmt" count="1"/>
<line num="325" type="stmt" count="1"/>
<line num="326" type="stmt" count="1"/>
<line num="330" type="stmt" count="1"/>
<line num="333" type="stmt" count="0"/>
<line num="335" type="stmt" count="0"/>
<line num="336" type="stmt" count="0"/>
Expand Down Expand Up @@ -174,7 +174,7 @@
<line num="404" type="stmt" count="0"/>
<line num="405" type="stmt" count="0"/>
<line num="406" type="stmt" count="0"/>
<metrics loc="407" ncloc="280" classes="1" methods="18" coveredmethods="4" conditionals="0" coveredconditionals="0" statements="116" coveredstatements="61" elements="134" coveredelements="65"/>
<metrics loc="407" ncloc="280" classes="1" methods="18" coveredmethods="5" conditionals="0" coveredconditionals="0" statements="116" coveredstatements="73" elements="134" coveredelements="78"/>
</file>
<file name="/Users/LukePOLO/PhpstormProjects/laracart/src/CartSubItem.php">
<class name="CartSubItem" namespace="LukePOLO\LaraCart">
Expand Down Expand Up @@ -546,62 +546,63 @@
<package name="LukePOLO\LaraCart\Coupons">
<file name="/Users/LukePOLO/PhpstormProjects/laracart/src/Coupons/Fixed.php">
<class name="Fixed" namespace="LukePOLO\LaraCart\Coupons">
<metrics methods="4" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="17" coveredstatements="5" elements="21" coveredelements="7"/>
<metrics methods="4" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="27" coveredstatements="0" elements="31" coveredelements="0"/>
</class>
<line num="27" type="method" name="__construct" crap="1" count="1"/>
<line num="29" type="stmt" count="1"/>
<line num="30" type="stmt" count="1"/>
<line num="32" type="stmt" count="1"/>
<line num="33" type="stmt" count="1"/>
<line num="27" type="method" name="__construct" crap="2" count="0"/>
<line num="28" type="stmt" count="0"/>
<line num="29" type="stmt" count="0"/>
<line num="30" type="stmt" count="0"/>
<line num="32" type="stmt" count="0"/>
<line num="33" type="stmt" count="0"/>
<line num="43" type="method" name="discount" crap="12" count="0"/>
<line num="44" type="stmt" count="0"/>
<line num="45" type="stmt" count="0"/>
<line num="46" type="stmt" count="0"/>
<line num="48" type="stmt" count="0"/>
<line num="49" type="stmt" count="0"/>
<line num="50" type="stmt" count="0"/>
<line num="52" type="stmt" count="0"/>
<line num="53" type="stmt" count="0"/>
<line num="54" type="stmt" count="0"/>
<line num="56" type="stmt" count="0"/>
<line num="66" type="method" name="forItem" crap="1" count="1"/>
<line num="68" type="stmt" count="1"/>
<line num="57" type="stmt" count="0"/>
<line num="66" type="method" name="forItem" crap="2" count="0"/>
<line num="67" type="stmt" count="0"/>
<line num="68" type="stmt" count="0"/>
<line num="69" type="stmt" count="0"/>
<line num="79" type="method" name="displayValue" crap="2" count="0"/>
<line num="80" type="stmt" count="0"/>
<line num="81" type="stmt" count="0"/>
<line num="82" type="stmt" count="0"/>
<line num="83" type="stmt" count="0"/>
<line num="84" type="stmt" count="0"/>
<line num="85" type="stmt" count="0"/>
<metrics loc="88" ncloc="55" classes="1" methods="4" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="17" coveredstatements="5" elements="21" coveredelements="7"/>
<line num="86" type="stmt" count="0"/>
<line num="87" type="stmt" count="0"/>
<metrics loc="88" ncloc="55" classes="1" methods="4" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="27" coveredstatements="0" elements="31" coveredelements="0"/>
</file>
<file name="/Users/LukePOLO/PhpstormProjects/laracart/src/Coupons/Percentage.php">
<class name="Percentage" namespace="LukePOLO\LaraCart\Coupons">
<metrics methods="4" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="22" coveredstatements="0" elements="26" coveredelements="0"/>
<metrics methods="4" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="13" coveredstatements="6" elements="17" coveredelements="7"/>
</class>
<line num="31" type="method" name="__construct" crap="2" count="0"/>
<line num="32" type="stmt" count="0"/>
<line num="33" type="stmt" count="0"/>
<line num="34" type="stmt" count="0"/>
<line num="36" type="stmt" count="0"/>
<line num="37" type="stmt" count="0"/>
<line num="46" type="method" name="forItem" crap="6" count="0"/>
<line num="47" type="stmt" count="0"/>
<line num="48" type="stmt" count="0"/>
<line num="49" type="stmt" count="0"/>
<line num="50" type="stmt" count="0"/>
<line num="31" type="method" name="__construct" crap="1" count="1"/>
<line num="33" type="stmt" count="1"/>
<line num="34" type="stmt" count="1"/>
<line num="36" type="stmt" count="1"/>
<line num="37" type="stmt" count="1"/>
<line num="46" type="method" name="forItem" crap="2.15" count="1"/>
<line num="48" type="stmt" count="1"/>
<line num="49" type="stmt" count="1"/>
<line num="52" type="stmt" count="0"/>
<line num="53" type="stmt" count="0"/>
<line num="63" type="method" name="discount" crap="2" count="0"/>
<line num="64" type="stmt" count="0"/>
<line num="65" type="stmt" count="0"/>
<line num="66" type="stmt" count="0"/>
<line num="67" type="stmt" count="0"/>
<line num="68" type="stmt" count="0"/>
<line num="69" type="stmt" count="0"/>
<line num="70" type="stmt" count="0"/>
<line num="71" type="stmt" count="0"/>
<line num="76" type="method" name="displayValue" crap="2" count="0"/>
<line num="77" type="stmt" count="0"/>
<line num="78" type="stmt" count="0"/>
<line num="79" type="stmt" count="0"/>
<metrics loc="80" ncloc="49" classes="1" methods="4" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="22" coveredstatements="0" elements="26" coveredelements="0"/>
<metrics loc="80" ncloc="49" classes="1" methods="4" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="13" coveredstatements="6" elements="17" coveredelements="7"/>
</file>
</package>
<package name="LukePOLO\LaraCart\Exceptions">
Expand Down Expand Up @@ -742,6 +743,6 @@
<line num="124" type="stmt" count="1"/>
<metrics loc="155" ncloc="37" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="7" coveredstatements="7" elements="7" coveredelements="7"/>
</file>
<metrics files="20" loc="2508" ncloc="1474" classes="17" methods="92" coveredmethods="25" conditionals="0" coveredconditionals="0" statements="528" coveredstatements="226" elements="620" coveredelements="251"/>
<metrics files="20" loc="2508" ncloc="1474" classes="17" methods="92" coveredmethods="25" conditionals="0" coveredconditionals="0" statements="529" coveredstatements="239" elements="621" coveredelements="264"/>
</project>
</coverage>
2 changes: 1 addition & 1 deletion tests/TotalsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public function testPreTaxationAndDiscountWithPercentageAt100PercentCoupon()
]));

$this->assertEquals(0, $this->laracart->subTotal(false));
$this->assertEquals(100, $this->laracart->totalDiscount(false));
$this->assertEquals(119, $this->laracart->totalDiscount(false));
$this->assertEquals(0, $this->laracart->taxTotal(false));
$this->assertEquals(0, $this->laracart->total(false));
}
Expand Down

0 comments on commit 24e937f

Please sign in to comment.