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