2022-06-15 21:37:10 +03:00
|
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2025-03-12 18:14:01 +01:00
|
|
|
namespace WooCommerce\PayPalCommerce\Tests\Integration;
|
2022-06-15 21:37:10 +03:00
|
|
|
|
2023-03-14 16:37:29 +02:00
|
|
|
use WooCommerce\PayPalCommerce\PPCP;
|
2022-11-09 10:11:31 +02:00
|
|
|
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
|
2022-06-20 09:09:27 +03:00
|
|
|
use WC_Cart;
|
|
|
|
use WC_Customer;
|
|
|
|
use WC_Session;
|
2022-06-15 21:37:10 +03:00
|
|
|
|
|
|
|
class TestCase extends \PHPUnit\Framework\TestCase
|
|
|
|
{
|
|
|
|
protected $container;
|
|
|
|
|
|
|
|
protected function getContainer(): ContainerInterface {
|
2023-03-14 16:37:29 +02:00
|
|
|
return PPCP::container();
|
2022-06-15 21:37:10 +03:00
|
|
|
}
|
2022-06-20 09:09:27 +03:00
|
|
|
|
|
|
|
protected function cart(): WC_Cart {
|
|
|
|
return WC()->cart;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function customer(): WC_Customer {
|
|
|
|
return WC()->customer;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function session(): WC_Session {
|
|
|
|
return WC()->session;
|
|
|
|
}
|
2022-06-15 21:37:10 +03:00
|
|
|
}
|