Update the testFromWcOrderMaxStringLength() test to match the new title sanitization and trimming

This commit is contained in:
Daniel Dudzic 2024-03-11 20:54:07 +01:00
parent beb14ea95a
commit 811c921b41
No known key found for this signature in database
GPG key ID: 31B40D33E3465483

View file

@ -312,11 +312,12 @@ class ItemFactoryTest extends TestCase
$result = $testee->from_wc_order($order);
$item = current($result);
/**
* @var Item $item
*/
$this->assertEquals(mb_substr($name, 0, 127), $item->name());
$this->assertEquals(substr($description, 0, 127), $item->description());
$this->assertEquals(substr( strip_shortcodes( wp_strip_all_tags( $name ) ), 0, 127 ), $item->name());
$this->assertEquals(substr( strip_shortcodes( wp_strip_all_tags( $description ) ), 0, 127 ), $item->description());
}
public function testFromPayPalResponse()