public function testGetSphereSides()
 {
     $sphere = new Shapes\Sphere(20);
     $sides = $sphere->getSides();
     $this->assertEquals(20, $sides);
 }
 /**
  * @depends testConstruct
  */
 public function testVolume(Shapes\Sphere $sphere)
 {
     $this->assertTrue(is_numeric($sphere->volume()));
 }
示例#3
0
 public function testPerimeter()
 {
     $radius = 90;
     $sphere = new Shapes\Sphere($radius);
     $this->assertEquals(2 * pi() * $radius, $sphere->perimeter());
 }
示例#4
0
 public function testSphereVolume()
 {
     $sphere = new Shapes\Sphere(3);
     $this->assertEquals(113.09733552923, $sphere->volume());
 }