function DrupalSolrOfflineEnvironmentWebTestCase::testIndexFileIncluded in Apache Solr Search 7
Same name and namespace in other branches
- 8 tests/apachesolr_base.test \DrupalSolrOfflineEnvironmentWebTestCase::testIndexFileIncluded()
- 6.3 tests/apachesolr_base.test \DrupalSolrOfflineEnvironmentWebTestCase::testIndexFileIncluded()
Asserts that the module was installed and that a notice appears that the server is offline
File
- tests/
apachesolr_base.test, line 107 - Unit test class that provides tests for base functionality of the Apachesolr Module without having the need of a Solr Server
Class
- DrupalSolrOfflineEnvironmentWebTestCase
- @file Unit test class that provides tests for base functionality of the Apachesolr Module without having the need of a Solr Server
Code
function testIndexFileIncluded() {
$env_id = apachesolr_default_environment();
$environment = apachesolr_environment_load($env_id);
$environment['url'] = 'http://localhost/solr/core_that_should_not_exist';
apachesolr_environment_save($environment);
$paths = array(
'user',
'node',
'admin/config/search/apachesolr',
'admin/config/search/apachesolr/search-pages',
'admin/config/search/apachesolr/search-pages/core_search/edit',
'admin/structure/block/manage/apachesolr_search/mlt-001/configure',
'admin/config/search/apachesolr/settings/solr/bias',
'admin/config/search/apachesolr/settings/solr/index',
'admin/config/search/apachesolr/settings/solr/edit',
'admin/reports/apachesolr',
'admin/reports/apachesolr/conf',
'search/site',
);
$this
->drupalLogin($this->admin_user);
foreach ($paths as $path) {
$this
->drupalGet($path);
$text = 'apachesolr.index.inc was included';
$this
->assertNoText($text, t('Apachesolr.index.inc was not included'));
}
}