- Implement OfferOptionAdminTest to validate offer option management, including price display, activation, and cancellation. - Create OrganizationPurchaseTest to ensure correct handling of organization purchases, including access control and order processing. - Add ShopProductPageTest to verify shop product listings, search functionality, and product page details. - Introduce BuildsShop trait for seeding test data related to shop functionality. - Implement MoneyTest to validate money parsing and formatting, ensuring correct handling of euro amounts.
22 lines
471 B
PHP
22 lines
471 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use App\Domain\Commerce\Shop;
|
|
use Closure;
|
|
use Illuminate\Http\Request;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
/**
|
|
* Warenkorb und Kasse gibt es nur mit Testzahlung und nie in Produktion (Etappe 1 erteilt keine Produktivfreigabe).
|
|
*/
|
|
class EnsureShopEnabled
|
|
{
|
|
public function handle(Request $request, Closure $next): Response
|
|
{
|
|
abort_unless(Shop::enabled(), 404);
|
|
|
|
return $next($request);
|
|
}
|
|
}
|