-
Notifications
You must be signed in to change notification settings - Fork 141
/
Copy pathCPTUI-Admin-UI-Wrappers-Test.php
87 lines (69 loc) · 1.7 KB
/
CPTUI-Admin-UI-Wrappers-Test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
require_once( 'CPTUI-Base-Tests.php' );
/**
* An example test case.
*/
class CPTUI_Admin_UI_Wrappers extends CPTUI_Base_Tests {
public function setUp() {
parent::setUp();
}
public function tearDown() {
parent::tearDown();
}
/**
* Tests our opening tr method.
*/
public function test_CPTUI_Opening_TR() {
$ui = new cptui_admin_ui();
$expected = '<tr valign="top">';
$this->assertEquals( $expected, $ui->get_tr_start() );
}
/**
* Tests our closing tr method.
*/
public function test_CPTUI_Closing_TR() {
$ui = new cptui_admin_ui();
$expected = '</tr>';
$this->assertEquals( $expected, $ui->get_tr_end() );
}
/**
* Tests our opening th method.
*/
public function test_CPTUI_Opening_TH() {
$ui = new cptui_admin_ui();
$expected = '<th scope="row">';
$this->assertEquals( $expected, $ui->get_th_start() );
}
/**
* Tests our closing th method.
*/
public function test_CPTUI_Closing_TH() {
$ui = new cptui_admin_ui();
$expected = '</th>';
$this->assertEquals( $expected, $ui->get_th_end() );
}
/**
* Tests our opening td method.
*/
public function test_CPTUI_Opening_TD() {
$ui = new cptui_admin_ui();
$expected = '<td>';
$this->assertEquals( $expected, $ui->get_td_start() );
}
/**
* Tests our closing td method.
*/
public function test_CPTUI_Closing_TD() {
$ui = new cptui_admin_ui();
$expected = '</td>';
$this->assertEquals( $expected, $ui->get_td_end() );
}
/**
* Tests our wrapping p tag.
*/
public function test_CPTUI_P_Wrap() {
$ui = new cptui_admin_ui();
$expected = '<p>CPTUI is Awesome!</p>';
$this->assertEquals( $expected, $ui->get_p( 'CPTUI is Awesome!' ) );
}
}