コード例 #1
0
ファイル: Triangle.php プロジェクト: lectrotext/hackbox
 /**
  * Sets the area of the triangle. 
  */
 public function setArea()
 {
     $this->area = $this->sides->getArea();
 }
コード例 #2
0
 public function testGetArea()
 {
     $triangle = new TriangleSides(3, 4, 5);
     $this->assertEquals(6.0, $triangle->getArea());
 }