저자: Victor Puertas (vpgugr@gmail.com)
예제 #1
0
 public function testDefaultCollection()
 {
     $cm = new CollectionManager();
     $this->assertCount(1, $cm->getCollectionItemCollection());
     $item = new Item('Test of content', 'member-1.html');
     $item->setPath('member-1.html', Item::SNAPSHOT_PATH_RELATIVE);
     $collection = $cm->getCollectionForItem($item);
     $this->assertEquals('pages', $collection->getName());
     $this->assertEquals('', $collection->getPath());
 }
예제 #2
0
 /**
  * @expectedException \RuntimeException
  */
 public function testAddExistingCollection()
 {
     $cm = new CollectionManager();
     $cm->addCollection(new Collection('pages', '_pages', ['output' => true]));
 }