Révision 30d5b9c5
Ajouté par Mathieu Schiano Di Schiabica il y a environ 8 ans
drupal7/modules/search/search.test | ||
---|---|---|
666 | 666 |
url('search/node/', array('absolute' => TRUE)), |
667 | 667 |
'Redirected to correct url.' |
668 | 668 |
); |
669 |
|
|
670 |
// Test that after entering a too-short keyword in the form, you can then |
|
671 |
// search again with a longer keyword. First test using the block form. |
|
672 |
$terms = array('search_block_form' => 'a'); |
|
673 |
$this->drupalPost('node', $terms, t('Search')); |
|
674 |
$this->assertText('You must include at least one positive keyword with 3 characters or more'); |
|
675 |
$terms = array('search_block_form' => 'foo'); |
|
676 |
$this->drupalPost(NULL, $terms, t('Search')); |
|
677 |
$this->assertNoText('You must include at least one positive keyword with 3 characters or more'); |
|
678 |
$this->assertText('Your search yielded no results'); |
|
679 |
|
|
680 |
// Same test again, using the search page form for the second search this time. |
|
681 |
$terms = array('search_block_form' => 'a'); |
|
682 |
$this->drupalPost('node', $terms, t('Search')); |
|
683 |
$terms = array('keys' => 'foo'); |
|
684 |
$this->drupalPost(NULL, $terms, t('Search')); |
|
685 |
$this->assertNoText('You must include at least one positive keyword with 3 characters or more'); |
|
686 |
$this->assertText('Your search yielded no results'); |
|
669 | 687 |
} |
670 | 688 |
} |
671 | 689 |
|
Formats disponibles : Unified diff
Update to 7.42