mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 16:24:33 +08:00
29 lines
753 B
PHP
29 lines
753 B
PHP
|
<?php
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace WooCommerce\PayPalCommerce\StatusReport;
|
||
|
|
||
|
use WooCommerce\PayPalCommerce\TestCase;
|
||
|
use function Brain\Monkey\Functions\when;
|
||
|
|
||
|
class RendererTest extends TestCase
|
||
|
{
|
||
|
public function testRender()
|
||
|
{
|
||
|
$items = [
|
||
|
[
|
||
|
'label' => 'Foo',
|
||
|
'value' => 'Bar'
|
||
|
],
|
||
|
];
|
||
|
|
||
|
when('esc_attr')->returnArg();
|
||
|
|
||
|
$testee = new Renderer();
|
||
|
$result = $testee->render('Some title here', $items);
|
||
|
|
||
|
self::assertStringContainsString('<h2>Some title here</h2>', $result);
|
||
|
self::assertStringContainsString('<td data-export-label="Foo">Foo</td>', $result);
|
||
|
self::assertStringContainsString('<td>Bar</td>', $result);
|
||
|
}
|
||
|
}
|