示例#1
0
 protected function proceed()
 {
     switch ($this->action) {
         case 'getAll':
             $this->succeed(StocksService::getLevels($this->params['locationId']));
             break;
     }
 }
 /** @depends testCreate */
 public function testReadInexistentLevels()
 {
     $level1 = new StockLevel($this->products[0]->id, $this->locations[0]->id, null, 1.2, 15.6, 10);
     $level1->id = StocksService::createLevel($level1);
     $level2 = new StockLevel($this->products[1]->id, $this->locations[0]->id, null, null, 10, 8.5);
     $level2->id = StocksService::createLevel($level2);
     $read = StocksService::getLevels("junk");
     $this->assertNull($read, "Junk id returned something");
 }