From 9ec7eba0f631192dc2145218138e60dcdb842775 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 13 Jun 2018 11:53:30 +0100 Subject: [PATCH] update image URLs --- tests/unit-tests/api/product-variations.php | 21 +++++++++++---------- tests/unit-tests/api/products.php | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/tests/unit-tests/api/product-variations.php b/tests/unit-tests/api/product-variations.php index d6c51e1ba2e..0f5d84070f7 100644 --- a/tests/unit-tests/api/product-variations.php +++ b/tests/unit-tests/api/product-variations.php @@ -173,7 +173,7 @@ class Product_Variations_API extends WC_REST_Unit_Test_Case { 'description' => 'O_O', 'image' => array( 'position' => 0, - 'src' => 'https://cldup.com/Dr1Bczxq4q.png', + 'src' => 'http://cldup.com/Dr1Bczxq4q.png', 'alt' => 'test upload image', ), 'attributes' => array( @@ -187,14 +187,15 @@ class Product_Variations_API extends WC_REST_Unit_Test_Case { $response = $this->server->dispatch( $request ); $variation = $response->get_data(); - $this->assertContains( 'O_O', $variation['description'] ); - $this->assertEquals( '8', $variation['price'] ); - $this->assertEquals( '8', $variation['sale_price'] ); - $this->assertEquals( '10', $variation['regular_price'] ); - $this->assertEquals( 'FIXED-SKU', $variation['sku'] ); - $this->assertEquals( 'medium', $variation['attributes'][0]['option'] ); - $this->assertContains( 'Dr1Bczxq4q', $variation['image']['src'] ); - $this->assertContains( 'test upload image', $variation['image']['alt'] ); + $this->assertTrue( isset( $variation['description'] ), print_r( $variation, true ) ); + $this->assertContains( 'O_O', $variation['description'], print_r( $variation, true ) ); + $this->assertEquals( '8', $variation['price'], print_r( $variation, true ) ); + $this->assertEquals( '8', $variation['sale_price'], print_r( $variation, true ) ); + $this->assertEquals( '10', $variation['regular_price'], print_r( $variation, true ) ); + $this->assertEquals( 'FIXED-SKU', $variation['sku'], print_r( $variation, true ) ); + $this->assertEquals( 'medium', $variation['attributes'][0]['option'], print_r( $variation, true ) ); + $this->assertContains( 'Dr1Bczxq4q', $variation['image']['src'], print_r( $variation, true ) ); + $this->assertContains( 'test upload image', $variation['image']['alt'], print_r( $variation, true ) ); } /** @@ -321,7 +322,7 @@ class Product_Variations_API extends WC_REST_Unit_Test_Case { 'description' => 'Updated description.', 'image' => array( 'position' => 0, - 'src' => 'https://cldup.com/Dr1Bczxq4q.png', + 'src' => 'http://cldup.com/Dr1Bczxq4q.png', 'alt' => 'test upload image', ), ), diff --git a/tests/unit-tests/api/products.php b/tests/unit-tests/api/products.php index 50964ba2968..188fb6a6483 100644 --- a/tests/unit-tests/api/products.php +++ b/tests/unit-tests/api/products.php @@ -175,7 +175,7 @@ class Products_API extends WC_REST_Unit_Test_Case { 'images' => array( array( 'position' => 0, - 'src' => 'https://cldup.com/Dr1Bczxq4q.png', + 'src' => 'http://cldup.com/Dr1Bczxq4q.png', 'alt' => 'test upload image', ), ),