Same filename and directory in other branches
- 8.x-3.x advagg_cdn/tests/src/Functional/CdnTest.php
- 8.x-4.x advagg_cdn/tests/src/Functional/CdnTest.php
Namespace
Drupal\Tests\advagg_cdn\Functional
File
-
advagg_cdn/tests/src/Functional/CdnTest.php
View source
<?php
namespace Drupal\Tests\advagg_cdn\Functional;
use Drupal\Core\Url;
use Drupal\Tests\advagg\Functional\AdvaggFunctionalTestBase;
class CdnTest extends AdvaggFunctionalTestBase {
protected static $modules = [
'advagg_cdn',
'advagg_test',
];
public function testCdn() {
$this->drupalGet(Url::fromRoute('advagg_cdn.settings'));
$session = $this->assertSession();
$session->statusCodeEquals(200);
$session->responseContains('src="//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"');
$session->responseNotContains('jquery-ui.min.css');
$edit = [
'jquery_ui_css' => TRUE,
'minified' => FALSE,
];
$this->submitForm($edit, $this->t('Save configuration'));
$session = $this->assertSession();
$session->responseNotContains('jquery.min.js');
$this->assertTrue($this->config('advagg_cdn.settings')
->get('jquery_ui_css'));
$session->responseContains('jquery.js');
$session->responseContains('jquery-ui.css');
}
}
Classes
| Title |
Deprecated |
Summary |
| CdnTest |
|
Tests that AdvAgg CDN changes are properly applied. |