mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Fix unit test
This commit is contained in:
parent
9dae2c1419
commit
0806ccf429
1 changed files with 6 additions and 3 deletions
|
@ -13,17 +13,20 @@ class RendererTest extends TestCase
|
|||
$items = [
|
||||
[
|
||||
'label' => 'Foo',
|
||||
'value' => 'Bar'
|
||||
'description' => 'Bar',
|
||||
'value' => 'Baz'
|
||||
],
|
||||
];
|
||||
|
||||
when('esc_attr')->returnArg();
|
||||
when('wc_help_tip')->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);
|
||||
self::assertStringContainsString('<td class="help">Bar</td>', $result);
|
||||
self::assertStringContainsString('<td>Baz</td>', $result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue