예제 #1
0
 public function testGetName()
 {
     $collection = CollectionFactory::fromArray(array('name' => array('value' => 'Roads and Boats', 'type' => 'primary', 'sort_index' => 1)));
     $name = $collection->getName();
     $this->assertInstanceOf('Shelf\\Entity\\Collection\\Name', $name);
     $this->assertEquals('Roads and Boats', $name->getValue());
 }
예제 #2
0
파일: Collection.php 프로젝트: janiv/shelf
 /**
  * {@inheritDoc}
  */
 public static function factory(array $data)
 {
     return CollectionFactory::fromArray($data);
 }
예제 #3
0
 public function testFromArray()
 {
     $collection = CollectionFactory::fromArray(array('bgg_id' => 8257));
     $this->assertInstanceOf('Shelf\\Entity\\Collection', $collection);
 }