Same filename and directory in other branches
- 5.0.x tests/src/Functional/AdvaggPathManipulationTest.php
- 6.0.x tests/src/Functional/AdvaggPathManipulationTest.php
- 8.x-3.x tests/src/Functional/AdvaggPathManipulationTest.php
- 8.x-4.x tests/src/Functional/AdvaggPathManipulationTest.php
Namespace
Drupal\advagg\Tests
Fichier
-
src/Tests/AdvaggPathManipulationTest.php
View source
<?php
namespace Drupal\advagg\Tests;
class AdvaggPathManipulationTest extends AdvaggTestBase {
public static $modules = [
'advagg',
'advagg_test',
];
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');
}
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');
}
}
Classes