Same name in other branches
- 5.0.x tests/src/Functional/AdvaggPathManipulationTest.php \Drupal\Tests\advagg\Functional\AdvaggPathManipulationTest
- 6.0.x tests/src/Functional/AdvaggPathManipulationTest.php \Drupal\Tests\advagg\Functional\AdvaggPathManipulationTest
- 8.x-3.x tests/src/Functional/AdvaggPathManipulationTest.php \Drupal\Tests\advagg\Functional\AdvaggPathManipulationTest
- 8.x-4.x tests/src/Functional/AdvaggPathManipulationTest.php \Drupal\Tests\advagg\Functional\AdvaggPathManipulationTest
Tests that all the asset path settings function correctly.
@group advagg
Hierarchy
- class \Drupal\advagg\Tests\AdvaggTestBase extends \Drupal\simpletest\WebTestBase
- class \Drupal\advagg\Tests\AdvaggPathManipulationTest extends \Drupal\advagg\Tests\AdvaggTestBase
Expanded class hierarchy of AdvaggPathManipulationTest
Sujets associés
Fichier
-
src/
Tests/ AdvaggPathManipulationTest.php, line 12
Namespace
Drupal\advagg\TestsView source
class AdvaggPathManipulationTest extends AdvaggTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = [
'advagg',
'advagg_test',
];
/**
* Tests force_https.
*/
public function testForceHttps() {
$this->config
->set('path.convert.force_https', TRUE)
->set('path.convert.absolute_to_protocol_relative', FALSE)
->save();
$this->drupalGet('');
$this->assertRaw('src="https://cdn.jsdelivr.net/jquery.actual/1.0.18/jquery.actual.min.js');
}
/**
* Tests absolute_to_protocol_relative.
*/
public function testAbsoluteToProtocolRelative() {
$this->config
->set('path.convert.absolute_to_protocol_relative', TRUE)
->set('path.convert.force_https', FALSE)
->save();
$this->drupalGet('');
$this->assertRaw('src="//cdn.jsdelivr.net/jquery.actual/1.0.18/jquery.actual.min.js');
}
}
Members
Titre Trier par ordre décroissant | Modifiers | Object type | Résumé | Overriden Title |
---|---|---|---|---|
AdvaggPathManipulationTest::$modules | public static | property | Modules to enable. | Overrides AdvaggTestBase::$modules |
AdvaggPathManipulationTest::testAbsoluteToProtocolRelative | public | function | Tests absolute_to_protocol_relative. | |
AdvaggPathManipulationTest::testForceHttps | public | function | Tests force_https. | |
AdvaggTestBase::$config | protected | property | Editable Advagg configuration. | |
AdvaggTestBase::$systemConfig | protected | property | Editable system configuration. | |
AdvaggTestBase::$user | protected | property | A user with permission to administer site configuration. | |
AdvaggTestBase::setUp | protected | function |