2022-06-15 21:37:10 +03:00
|
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace WooCommerce\PayPalCommerce\Tests\E2e;
|
|
|
|
|
|
|
|
use PPCP_E2E;
|
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 {
|
|
|
|
return PPCP_E2E::$container;
|
|
|
|
}
|
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
|
|
|
}
|