Inheritance: extends lithium\data\Model
Esempio n. 1
0
 public function testRemove()
 {
     $this->assertTrue(Galleries::remove());
     $this->assertTrue(Images::remove());
 }
 protected function _createGalleriesWithImages()
 {
     $this->_createGalleries();
     foreach ($this->images as $key => $image) {
         $entity = Images::create($image);
         $this->assertEqual(true, $entity->save());
     }
 }
Esempio n. 3
0
 protected function _createGalleryWithImages()
 {
     $gallery = $this->_createGallery();
     foreach ($this->images as $key => $image) {
         unset($image['id'], $image['gallery_id']);
         $img = Images::create($image + array('gallery_id' => $gallery->id));
         $this->assertEqual(true, $img->save());
         $this->images[$key]['id'] = $img->id;
         $this->images[$key]['gallery_id'] = $gallery->id;
     }
 }