public function setContent($content, $snapshotName) { $this->snapshot[$snapshotName] = $content; $this->snapshot[self::SNAPSHOT_LAST] = $content; }
public function testMultipleSnapshotOfContent() { $item = new Item('Raw content', 'index.html', []); $this->assertEquals('Raw content', $item->getContent(Item::SNAPSHOT_RAW)); $item->setContent('After convert content', Item::SNAPSHOT_AFTER_CONVERT); $this->assertEquals('After convert content', $item->getContent()); $this->assertEquals('After convert content', $item->getContent(Item::SNAPSHOT_AFTER_CONVERT)); $this->assertEquals('Raw content', $item->getContent(Item::SNAPSHOT_RAW)); }