woocommerce-paypal-payments/tests/integration/PHPUnit/TestCase.php

32 lines
622 B
PHP
Raw Normal View History

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
use WooCommerce\PayPalCommerce\PPCP;
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::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
}