Skip to content

Commit bd58b86

Browse files
committed
Declare shippingcarticon + tests
1 parent e0cc55f commit bd58b86

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

WooCommerce/Classes/Extensions/UIImage+Woo.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,14 @@ extension UIImage {
408408
return UIImage(named: "card-reader-low-battery")!
409409
}
410410

411+
/// Shopping cart
412+
///
413+
static var shoppingCartIcon: UIImage {
414+
return UIImage(named: "icon-shopping-cart")!
415+
.withRenderingMode(.alwaysTemplate)
416+
.imageFlippedForRightToLeftLayoutDirection()
417+
}
418+
411419
/// Files Download Icon
412420
///
413421
static var cloudImage: UIImage {

WooCommerce/WooCommerceTests/Extensions/IconsTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,4 +528,8 @@ final class IconsTests: XCTestCase {
528528
func test_lightningImage_is_not_nil() {
529529
XCTAssertNotNil(UIImage.lightningImage)
530530
}
531+
532+
func test_shoppingCartIcon_is_not_nil() {
533+
XCTAssertNotNil(UIImage.shoppingCartIcon)
534+
}
531535
}

0 commit comments

Comments
 (0)