setFields() public method

Set the fields to display
public setFields ( array $fields ) : self
$fields array
return self
コード例 #1
0
ファイル: ImagesTest.php プロジェクト: sgulseth/imbo
 /**
  * @covers Imbo\Model\Images::setFields
  * @covers Imbo\Model\Images::getFields
  */
 public function testCanSetAndGetFields()
 {
     $this->assertSame(array(), $this->model->getFields());
     $this->assertSame($this->model, $this->model->setFields(array('width', 'height')));
     $this->assertSame(array('width', 'height'), $this->model->getFields());
 }
コード例 #2
0
ファイル: ImagesTest.php プロジェクト: imbo/imbo
 /**
  * @covers Imbo\Model\Images::setFields
  * @covers Imbo\Model\Images::getFields
  */
 public function testCanSetAndGetFields()
 {
     $this->assertSame([], $this->model->getFields());
     $this->assertSame($this->model, $this->model->setFields(['width', 'height']));
     $this->assertSame(['width', 'height'], $this->model->getFields());
 }