PHPCS fixes.
This commit is contained in:
parent
99f85a55d5
commit
bb41311ccf
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
Comment: We're adding extra protections to a newly introduced feature; a further changelog entry is not needed.
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ class WC_Download_Handler_Tests extends \WC_Unit_Test_Case {
|
|||
* Test for local file path.
|
||||
*/
|
||||
public function test_parse_file_path_for_local_file() {
|
||||
$local_file_path = trailingslashit( wp_upload_dir()['basedir'] ) . 'dummy_file.jpg';
|
||||
$local_file_path = trailingslashit( wp_upload_dir()['basedir'] ) . 'dummy_file.jpg';
|
||||
$parsed_file_path = WC_Download_Handler::parse_file_path( $local_file_path );
|
||||
$this->assertFalse( $parsed_file_path['remote_file'] );
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ class WC_Download_Handler_Tests extends \WC_Unit_Test_Case {
|
|||
* Test for local URL without protocol.
|
||||
*/
|
||||
public function test_parse_file_path_for_local_url() {
|
||||
$local_file_path = trailingslashit( wp_upload_dir()['baseurl'] ) . 'dummy_file.jpg';
|
||||
$local_file_path = trailingslashit( wp_upload_dir()['baseurl'] ) . 'dummy_file.jpg';
|
||||
$parsed_file_path = WC_Download_Handler::parse_file_path( $local_file_path );
|
||||
$this->assertFalse( $parsed_file_path['remote_file'] );
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ class WC_Download_Handler_Tests extends \WC_Unit_Test_Case {
|
|||
* Test for local file with `file` protocol.
|
||||
*/
|
||||
public function test_parse_file_path_for_local_file_protocol() {
|
||||
$local_file_path = 'file:/' . trailingslashit( wp_upload_dir()['basedir'] ) . 'dummy_file.jpg';
|
||||
$local_file_path = 'file:/' . trailingslashit( wp_upload_dir()['basedir'] ) . 'dummy_file.jpg';
|
||||
$parsed_file_path = WC_Download_Handler::parse_file_path( $local_file_path );
|
||||
$this->assertFalse( $parsed_file_path['remote_file'] );
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class WC_Download_Handler_Tests extends \WC_Unit_Test_Case {
|
|||
* Test for local file with https protocom.
|
||||
*/
|
||||
public function test_parse_file_path_for_local_file_https_protocol() {
|
||||
$local_file_path = site_url( '/', 'https' ) . 'dummy_file.jpg';
|
||||
$local_file_path = site_url( '/', 'https' ) . 'dummy_file.jpg';
|
||||
$parsed_file_path = WC_Download_Handler::parse_file_path( $local_file_path );
|
||||
$this->assertFalse( $parsed_file_path['remote_file'] );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue