Skip to content

Commit

Permalink
Merge pull request #14 from EscolaLMS/feature/START-40
Browse files Browse the repository at this point in the history
Force cart version
  • Loading branch information
HerbertIV authored Feb 23, 2022
2 parents 9a05422 + 553caed commit 50f49cd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"escolalms/categories": "^0",
"escolalms/jitsi": "^0",
"laravel/framework": ">=8.0",
"escolalms/cart": "0.1.9"
"escolalms/cart": "0.1.19"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
Expand Down
4 changes: 2 additions & 2 deletions src/Listeners/ReportTermListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace EscolaLms\Consultations\Listeners;

use EscolaLms\Cart\Events\OrderPaid;
use EscolaLms\Cart\Events\CartOrderPaid;
use EscolaLms\Consultations\Services\Contracts\ConsultationServiceContract;

class ReportTermListener
Expand All @@ -15,7 +15,7 @@ public function __construct(
$this->consultationServiceContract = $consultationServiceContract;
}

public function handle(OrderPaid $event)
public function handle(CartOrderPaid $event)
{
$this->consultationServiceContract->setPivotOrderConsultation($event->getOrder(), $event->getUser());
}
Expand Down
4 changes: 2 additions & 2 deletions tests/APIs/ConsultationProposedTermsApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace EscolaLms\Consultations\Tests\APIs;

use Carbon\Carbon;
use EscolaLms\Cart\Events\OrderPaid;
use EscolaLms\Cart\Events\CartOrderPaid;
use EscolaLms\Cart\Models\Order;
use EscolaLms\Cart\Models\OrderItem;
use EscolaLms\Cart\Models\User;
Expand Down Expand Up @@ -58,7 +58,7 @@ function (Consultation $consultation) {
'subtotal' => $price,
]);
Event::fake();
$event = new OrderPaid($this->order, $this->user);
$event = new CartOrderPaid($this->user, $this->order);
$listener = app(ReportTermListener::class);
$listener->handle($event);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/APIs/ConsultationReportTermTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace EscolaLms\Consultations\Tests\APIs;

use EscolaLms\Cart\Events\OrderPaid;
use EscolaLms\Cart\Events\CartOrderPaid;
use EscolaLms\Cart\Models\Order;
use EscolaLms\Cart\Models\OrderItem;
use EscolaLms\Cart\Models\User;
Expand Down Expand Up @@ -54,7 +54,7 @@ function (Consultation $consultation) {
'subtotal' => $price,
]);
Event::fake();
$event = new OrderPaid($this->order, $this->user);
$event = new CartOrderPaid($this->user, $this->order);
$listener = app(ReportTermListener::class);
$listener->handle($event);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Providers/EventsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EscolaLms\Consultations\Tests\Providers;

use EscolaLms\Cart\Events\OrderPaid;
use EscolaLms\Cart\Events\CartOrderPaid;
use EscolaLms\Consultations\Listeners\ReportTermListener;
use Illuminate\Support\ServiceProvider;

class EventsServiceProvider extends ServiceProvider
{
protected $listen = [
OrderPaid::class => [
CartOrderPaid::class => [
ReportTermListener::class,
],
];
Expand Down

0 comments on commit 50f49cd

Please sign in to comment.