2020-04-28 15:03:25 +03:00
|
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-09-14 07:51:45 +03:00
|
|
|
namespace WooCommerce\PayPalCommerce;
|
2020-04-28 15:03:25 +03:00
|
|
|
|
2021-08-27 20:10:57 +03:00
|
|
|
use function Brain\Monkey\Functions\when;
|
2020-04-28 15:03:25 +03:00
|
|
|
use function Brain\Monkey\setUp;
|
|
|
|
use function Brain\Monkey\tearDown;
|
|
|
|
use Mockery;
|
|
|
|
|
|
|
|
class TestCase extends \PHPUnit\Framework\TestCase
|
|
|
|
{
|
2021-09-09 12:14:50 +03:00
|
|
|
public function setUp(): void
|
|
|
|
{
|
|
|
|
parent::setUp();
|
2021-08-27 20:10:57 +03:00
|
|
|
|
2021-09-09 12:14:50 +03:00
|
|
|
when('__')->returnArg();
|
|
|
|
when('_x')->returnArg();
|
2021-08-27 20:41:06 +03:00
|
|
|
when('esc_url')->returnArg();
|
|
|
|
when('esc_attr')->returnArg();
|
|
|
|
when('esc_attr__')->returnArg();
|
|
|
|
when('esc_html')->returnArg();
|
|
|
|
when('esc_html__')->returnArg();
|
|
|
|
when('esc_textarea')->returnArg();
|
|
|
|
when('sanitize_text_field')->returnArg();
|
2021-09-09 12:14:50 +03:00
|
|
|
when('wp_kses_post')->returnArg();
|
2021-08-27 20:41:06 +03:00
|
|
|
when('wp_unslash')->returnArg();
|
2021-08-27 20:10:57 +03:00
|
|
|
|
2021-09-09 12:14:50 +03:00
|
|
|
setUp();
|
|
|
|
}
|
2020-04-28 15:03:25 +03:00
|
|
|
|
2021-09-09 12:14:50 +03:00
|
|
|
public function tearDown(): void
|
|
|
|
{
|
|
|
|
tearDown();
|
|
|
|
Mockery::close();
|
|
|
|
parent::tearDown();
|
|
|
|
}
|
2020-04-28 15:03:25 +03:00
|
|
|
}
|