updateSingleValue() public method

It is called in list of contents.
public updateSingleValue ( string $contenttype, integer $id, string $field, mixed $value ) : boolean
$contenttype string Content Type to be edited.
$id integer Id of content to be updated.
$field string Field name of content to be changed.
$value mixed New value to be defined on field.
return boolean Returns true when update is done or false if not.
Example #1
0
 public function testUpdateSingleValue()
 {
     $app = $this->getApp();
     $app['request'] = Request::create('/');
     $storage = new Storage($app);
     $fetch1 = $storage->getContent('showcases/2');
     $this->assertEquals(1, $fetch1->get('ownerid'));
     $result = $storage->updateSingleValue('showcases', 2, 'ownerid', '10');
     $this->assertEquals(2, $result);
     $fetch2 = $storage->getContent('showcases/2');
     $this->assertEquals('10', $fetch2->get('ownerid'));
     // Test invalid column fails
     $shouldError = $storage->updateSingleValue('showcases', 2, 'nonexistent', '10');
     $this->assertFalse($shouldError);
 }