/**
* Build an attachment object.
*
* @param \Codesleeve\Stapler\Interpolator
* @return \Codesleeve\Stapler\Attachment
*/
protected function build_attachment()
{
Stapler::boot();
$instance = $this->build_mock_instance();
$interpolator = new Interpolator();
$attachmentConfig = new \Codesleeve\Stapler\AttachmentConfig('photo', ['styles' => [], 'placeholder_style' => 'original', 'url' => '/system/:attachment/:id_partition/:style/:filename', 'path' => ':app_root/public:url']);
$imagine = m::mock('Imagine\\Image\\ImagineInterface');
$resizer = new \Codesleeve\Stapler\File\Image\Resizer($imagine);
$attachment = new \Codesleeve\Stapler\Attachment($attachmentConfig, $interpolator, $resizer);
$attachment->setInstance($instance);
$storageDriver = new \Codesleeve\Stapler\Storage\Filesystem($attachment);
$attachment->setStorageDriver($storageDriver);
return $attachment;
}