コード例 #1
0
 public function testGetSphereArea()
 {
     $sphere = new Shapes\Sphere(20);
     $area = $sphere->area($sphere);
     $this->assertEquals(14.049629462081, $area);
 }
コード例 #2
0
 /**
  * @depends testConstruct
  */
 public function testArea(Shapes\Sphere $sphere)
 {
     $this->assertTrue(is_numeric($sphere->area()));
 }
コード例 #3
0
 public function testArea()
 {
     $radius = 90;
     $sphere = new Shapes\Sphere($radius);
     $this->assertEquals(4 * pi() * pow($radius, 2), $sphere->area());
 }
コード例 #4
0
 public function testSphereArea()
 {
     $sphere = new Shapes\Sphere(3);
     $this->assertEquals(113.09733552923, $sphere->area());
 }