array('Local address', 'style="width: 150px;"'),
array(NULL, 'style="width: 20px;"'),
'peer_ip' => array('Peer address', 'style="width: 150px;"'),
'type' => array('Type', 'style="width: 50px;"'),
array('Family'),
'peer_as' => 'Remote AS',
'state' => 'State',
'Uptime / Updates',
NULL
);
$this->assertSame($result, get_table_header($cols, $vars));
}
public function providerGetTableHeader()
{
return array(
array( // Sorting enabled
array('page' => 'routing', 'protocol' => 'bgp', 'type' => 'all'),
'
' . PHP_EOL
),
array( // Sorting enabled, selected type
array('page' => 'routing', 'protocol' => 'bgp', 'type' => 'all', 'sort' => 'type'),
'
Local address
Peer address
Type
Family
Remote AS
State
Uptime / Updates
' . PHP_EOL
),
array( // Sorting disabled
array(),
'
Local address
Peer address
Type
Family
Remote AS
State
Uptime / Updates
' . PHP_EOL
),
);
}
/**
* @dataProvider providerGetForm
* @group forms
*/
public function testGetForm($form, $html)
{
//echo "\n<<
Local address
Peer address
Type
Family
Remote AS
State
Uptime / Updates
Welcome to the demo:
⌘ + Enter