Esempio n. 1
0
 public function test_it_returns_verbose_level()
 {
     $levels = array('exhausted', 'almost empty', 'low', 'medium', 'high', 'almost full');
     foreach ($levels as $level => $expected) {
         $testedLevel = new SupplyLevel($level);
         $this->assertEquals($expected, $testedLevel->verbose());
     }
 }
 public function __construct($level)
 {
     $this->isValidLevel($level);
     parent::__construct($this->levels[$level]);
 }