Skip to content

Commit f41c4e7

Browse files
chore: unit tests
1 parent 53ae779 commit f41c4e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test-image-import.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function test_image_import_url() {
2424

2525
// Check that NON-IMAGE URL returns invalid
2626
$import_info = array();
27-
$arguments = array( 'a random string', 0, 'Post Title', $import_info, array() );
27+
$arguments = array( 'a random string', 0, 'Post Title', &$import_info, array() );
2828
$response = $try_save_featured_image->invokeArgs( $feedzy, $arguments );
2929

3030
$this->assertFalse( $response );
@@ -52,14 +52,14 @@ public function test_image_import_url() {
5252
}, 10, 5 );
5353

5454
$import_info = array();
55-
$arguments = array( 'https://example.com/path_to_image/image.jpeg', 0, 'Post Title', $import_info, array() );
55+
$arguments = array( 'https://example.com/path_to_image/image.jpeg', 0, 'Post Title', &$import_info, array() );
5656
$response = $try_save_featured_image->invokeArgs( $feedzy, $arguments );
5757

5858
// expected response is false because the image does not exist, but the URL is valid so no errors should be logged for URL validation
5959
$this->assertFalse( $response );
6060

6161
$import_info = array();
62-
$arguments = array( 'https://example.com/path_to_image/image w space in name.jpeg', 0, 'Post Title', $import_info, array() );
62+
$arguments = array( 'https://example.com/path_to_image/image w space in name.jpeg', 0, 'Post Title', &$import_info, array() );
6363
$response = $try_save_featured_image->invokeArgs( $feedzy, $arguments );
6464

6565
// expected response is false because the image does not exist, but the URL is valid so no errors should be logged for URL validation
@@ -76,7 +76,7 @@ public function test_import_image_special_characters() {
7676
$import_errors = array();
7777
$import_info = array();
7878

79-
$arguments = array( 'https://example.com/path_to_image/çöp.jpg?itok=ZYU_ihPB', 0, 'Post Title', &$import_errors, &$import_info, array() );
79+
$arguments = array( 'https://example.com/path_to_image/çöp.jpg?itok=ZYU_ihPB', 0, 'Post Title', &$import_info, array() );
8080
$response = $try_save_featured_image->invokeArgs( $feedzy, $arguments );
8181

8282
// expected response is false because the image does not exist, but the URL is valid so no $import_errors should be set.

0 commit comments

Comments
 (0)