/**
  * @test
  * @group facade-item-set-param
  * @group facade
  */
 public function セッターのテスト()
 {
     $id = 153;
     $this->item->setId($id);
     $this->assertEquals($id, $this->item->getId());
     $name = 'hooooooo!!!!';
     $this->item->setName($name);
     $this->assertEquals($name, $this->item->getName());
     $price = 2000;
     $this->item->setPrice($price);
     $this->assertEquals($price, $this->item->getPrice());
 }
Beispiel #2
0
 /**
  * @return void
  */
 private function __construct()
 {
     $fp = fopen(ROOT . '/data/Facade/item.csv', 'r');
     while ($data = fgetcsv($fp, 1000, ',')) {
         $item = new Item();
         $item->setId($data[0]);
         $item->setName($data[1]);
         $item->setPrice($data[2]);
         $this->items[$item->getId()] = $item;
     }
     fclose($fp);
 }