Esempio n. 1
0
 /**
  *
  */
 public function testInitialState()
 {
     $attribute = new Attribute();
     $this->assertNull($attribute->getId(), 'Attribute::id should be null');
     $this->assertTrue($attribute->getAdded() instanceof DateTime, 'Attribute::added should have a DateTime value.');
     $this->assertTrue($attribute->getAdded() == new DateTime(), 'Attribute::added should be set to today when instantiated');
     $this->assertNull($attribute->getRemoved(), 'Attribute::removed should be null');
     $this->assertNull($attribute->getUser(), 'Attribute::user should be null');
     $this->assertNull($attribute->getName(), 'Attribute::name should be null');
     $this->assertNull($attribute->getValue(), 'Attribute::value should be null');
 }