Fix unit tests
Signed-off-by: Marc Delisle <marc@infomarc.info>
This commit is contained in:
parent
6089849fcc
commit
cc0b6497c0
@ -99,31 +99,21 @@ class PMA_MultSubmits_Test extends PHPUnit_Framework_TestCase
|
||||
//Call the test function
|
||||
$html = PMA_getHtmlForReplacePrefixTable($action, $_url_params);
|
||||
|
||||
//validate 1: form action
|
||||
//form action
|
||||
$this->assertContains(
|
||||
'<form action="' . $action . '" method="post">',
|
||||
'<form id="ajax_form" action="delete_row" method="post">',
|
||||
$html
|
||||
);
|
||||
//validate 2: $PMA_URL_getHiddenInputs
|
||||
//$PMA_URL_getHiddenInputs
|
||||
$this->assertContains(
|
||||
PMA_URL_getHiddenInputs($_url_params),
|
||||
$html
|
||||
);
|
||||
//validate 3: title
|
||||
$this->assertContains(
|
||||
__('Replace table prefix:'),
|
||||
$html
|
||||
);
|
||||
//validate 4: from_prefix
|
||||
//from_prefix
|
||||
$this->assertContains(
|
||||
'<input type="text" name="from_prefix" id="initialPrefix" />',
|
||||
$html
|
||||
);
|
||||
//validate 5: Submit button
|
||||
$this->assertContains(
|
||||
__('Submit'),
|
||||
$html
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -139,31 +129,21 @@ class PMA_MultSubmits_Test extends PHPUnit_Framework_TestCase
|
||||
//Call the test function
|
||||
$html = PMA_getHtmlForAddPrefixTable($action, $_url_params);
|
||||
|
||||
//validate 1: form action
|
||||
//form action
|
||||
$this->assertContains(
|
||||
'<form action="' . $action . '" method="post">',
|
||||
'<form id="ajax_form" action="' . $action . '" method="post">',
|
||||
$html
|
||||
);
|
||||
//validate 2: $_url_params
|
||||
//$_url_params
|
||||
$this->assertContains(
|
||||
PMA_URL_getHiddenInputs($_url_params),
|
||||
$html
|
||||
);
|
||||
//validate 3: title
|
||||
$this->assertContains(
|
||||
'<legend>' . __('Add table prefix:') . '</legend>',
|
||||
$html
|
||||
);
|
||||
//validate 4: from_prefix
|
||||
//from_prefix
|
||||
$this->assertContains(
|
||||
__('Add prefix'),
|
||||
$html
|
||||
);
|
||||
//validate 5: Submit
|
||||
$this->assertContains(
|
||||
__('Submit'),
|
||||
$html
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user