Ejemplo n.º 1
0
 public function setUp()
 {
     parent::setUp();
     $this->data = array(array('id' => 1, 'name' => 'Staff', 'model' => 'test_position'), array('id' => 2, 'name' => 'Freelancer', 'model' => 'test_position'), array('id' => 3, 'name' => 'Manager', 'model' => 'test_position'));
     $this->collection = new Jam_Query_Builder_Collection('test_position');
     $this->collection->load_fields($this->data);
 }
Ejemplo n.º 2
0
 public function setUp()
 {
     parent::setUp();
     $this->timezone = new Jam_Timezone();
     $this->timezone->default_timezone('Europe/Sofia')->user_timezone('Europe/Moscow');
     $this->date = 1268649900;
 }
Ejemplo n.º 3
0
 public function setUp()
 {
     parent::setUp();
     $this->collection = new Jam_Query_Builder_Collection('test_element');
     $this->collection->load_fields($this->data);
     $this->array = new Jam_Array_Model();
     $this->array->collection($this->collection);
     $this->array->model('test_element');
 }
Ejemplo n.º 4
0
 public function setUp()
 {
     parent::setUp();
     $this->collection = new Jam_Query_Builder_Collection('test_element');
     $this->collection->load_fields($this->data);
     $this->parent = Jam::build('test_author')->load_fields(array('id' => 1, 'name' => 'author'));
     $this->association = $this->getMock('Jam_Association_Hasmany', array('item_get', 'item_set', 'item_unset', 'clear', 'save', 'collection'));
     $this->association->initialize(Jam::meta('test_author'), 'test_elements');
     $this->array = new Jam_Array_Association();
     $this->array->model('test_element')->association($this->association)->parent($this->parent);
 }
Ejemplo n.º 5
0
 public function setUp()
 {
     parent::setUp();
     Database::instance(Kohana::TESTING)->begin();
 }
Ejemplo n.º 6
0
 public function setUp()
 {
     parent::setUp();
     $this->event = new Jam_Event('test_position');
 }
Ejemplo n.º 7
0
 public function setUp()
 {
     parent::setUp();
     $this->post = Jam::build('test_post')->load_fields(array('id' => 1, 'name' => 'First Post', 'slug' => 'first-post', 'status' => 'draft', 'test_blog_id' => 1, 'test_blog' => array('id' => 1, 'name' => 'Flowers blog', 'url' => 'http://flowers.wordpress.com/'), 'test_tags' => array(array('id' => 1, 'name' => 'red', 'slug' => 'red'), array('id' => 2, 'name' => 'green', 'slug' => 'green'))));
     $this->form = Jam::form($this->post);
 }
Ejemplo n.º 8
0
 public function setUp()
 {
     parent::setUp();
     $this->post = Jam::build('test_post')->load_fields(array('id' => 1, 'name' => 'First Post', 'slug' => 'first-post', 'status' => 'draft', 'test_blog_id' => 1));
     $this->form = Jam::form($this->post, 'general');
 }