public function testCreate() { $item = Item::create($this->library, 'todo'); $this->assertEquals('todo', $item->type()); $this->assertEquals('draft', $item->status()); // search for the item in the library $this->assertEquals($item, $this->library->find($item->id)); }
public function create($type, $data = array()) { return Item::create($this, $type, $data); }