Пример #1
0
 /** @test */
 function it_deletes_self()
 {
     $substitute = $this->getNewSubstitute(['path' => '', 'extension' => 'ext', 'mimetype' => 'audio/ogg', 'size' => 1000]);
     $this->assertNotNull(Substitute::find($substitute->getKey()));
     $substitute->delete();
     $this->assertNull(Substitute::find($substitute->getKey()));
 }
Пример #2
0
 /** @test */
 function it_can_substitute_media()
 {
     $substitute = Substitute::create(['path' => '', 'extension' => 'ext', 'mimetype' => 'video/ogg', 'size' => 1000]);
     $video = Video::create(['name' => '', 'path' => '', 'extension' => 'ext', 'mimetype' => 'video/ogg', 'size' => 1000]);
     $video->addSubstitute($substitute);
     $this->assertNotNull($video->getSubstitutes()->find($substitute->getKey()));
 }