public function testName() { $address = new \XLite\Model\Address(); $address->setName('first'); $this->assertEquals('first', $address->getName(), 'check name #1'); $this->assertEquals('first', $address->getFirstName(), 'check firstname #1'); $this->assertEquals('', $address->getLastName(), 'check lastname #1'); $address->setName('first2 last'); $this->assertEquals('first2 last', $address->getName(), 'check name #2'); $this->assertEquals('first2', $address->getFirstName(), 'check firstname #2'); $this->assertEquals('last', $address->getLastName(), 'check lastname #2'); $address->setName('first3 last2 mid'); $this->assertEquals('first3 last2 mid', $address->getName(), 'check name #3'); $this->assertEquals('first3', $address->getFirstName(), 'check firstname #3'); $this->assertEquals('last2 mid', $address->getLastName(), 'check lastname #3'); $address->setName(' first4 last3 mid '); $this->assertEquals('first4 last3 mid', $address->getName(), 'check name #4'); $this->assertEquals('first4', $address->getFirstName(), 'check firstname #4'); $this->assertEquals('last3 mid', $address->getLastName(), 'check lastname #4'); }