setExtension() public method

Sets the value of extension.
public setExtension ( string $extension ) : self
$extension string the extension
return self
 public function it_should_return_path_for_attachment()
 {
     $this->getStorageLocation(new Attachment())->shouldBe(realpath(__DIR__ . '/../../../newscoop/public/files') . '/0000/0000/000000000');
     $attachment = new Attachment();
     $attachment->setExtension('pdf')->setId(34);
     $this->getStorageLocation($attachment)->shouldBe(realpath(__DIR__ . '/../../../newscoop/public/files') . '/0000/0000/000000034.pdf');
 }