Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anjali rani test #639

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![Latest Unstable Version](https://poser.pugx.org/gloudemans/shoppingcart/v/unstable)](https://packagist.org/packages/gloudemans/shoppingcart)
[![License](https://poser.pugx.org/gloudemans/shoppingcart/license)](https://packagist.org/packages/gloudemans/shoppingcart)

#Jai Mata Di. Rocks
A simple shoppingcart implementation for Laravel.

## Installation
Expand Down
20 changes: 11 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
{
{

"name": "gloudemans/shoppingcart",
"description": "Laravel Shoppingcart",
"language": "php/shoppingcart",
"keywords": ["laravel", "shoppingcart"],
"license": "MIT",
"authors": [
{
"name": "Rob Gloudemans",
"email": "[email protected]"
}
],
"require": {
//"authors": [
//{
//"name": "Rob Gloudemans",
//"email": "[email protected]"
//}
// ],
"Require": {
"illuminate/support": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*|| 5.6.* || 5.7.*",
"illuminate/session": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*|| 5.6.* || 5.7.*",
"illuminate/events": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*|| 5.6.* || 5.7.*"
},
"require-dev": {
"Require-dev": {
"phpunit/phpunit": "~5.0 || ~6.0 || ~7.0",
"mockery/mockery": "~0.9.0",
"orchestra/testbench": "~3.1"
Expand Down
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
<?php
$name = "Hello Anjali!";
echo $name;
</testsuite>
</testsuites>
</phpunit>
10 changes: 5 additions & 5 deletions src/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,18 @@ public function update($rowId, $qty)
}

/**
* Remove the cart item with the given rowId from the cart.
* Remove the cart item with the given rowNum from the cart.
*
* @param string $rowId
* @param string $rowNum
* @return void
*/
public function remove($rowId)
public function remove($rowNum)
{
$cartItem = $this->get($rowId);
$cartItem = $this->get($rowNum);

$content = $this->getContent();

$content->pull($cartItem->rowId);
$content->pull($cartItem->rowNum);

$this->events->fire('cart.removed', $cartItem);

Expand Down