コード例 #1
0
 public function testValidation()
 {
     $noteDescription = 'New Note Description';
     $noteName = 'New Note: ' . uniqid();
     $noteType = 'Confirmation';
     $this->assertFalse($this->note->isValid());
     $this->note->setDescription($noteDescription);
     $this->assertFalse($this->note->isValid());
     $this->note->setName($noteName);
     $this->assertFalse($this->note->isValid());
     $this->note->setType($noteType);
     $this->assertTrue($this->note->isValid());
     $this->assertEquals($noteName, $this->note->getName());
     $this->assertEquals($noteType, $this->note->getType());
 }