function testProductTitleTrailingWhiteSpace() { $this->logInWithPermission('ADMIN'); $product = $this->objFromFixture('ProductPage', 'product1'); $product->Title = "Test with trailing space "; $product->ParentID = ProductHolder::get()->first()->ID; $product->doPublish(); $this->assertTrue($product->Title == 'Test with trailing space'); }
function setUp() { parent::setUp(); $productHolder = ProductHolder::create(); $productHolder->Title = 'Product Holder'; $productHolder->write(); $product = $this->objFromFixture('ProductPage', 'product1'); $product->ParentID = $productHolder->ID; $product->write(); }