/** @test */ function it_can_substitute_media() { $substitute = Substitute::create(['path' => '', 'extension' => 'ext', 'mimetype' => 'audio/ogg', 'size' => 1000]); $audio = Audio::create(['name' => '', 'path' => '', 'extension' => 'ext', 'mimetype' => 'audio/ogg', 'size' => 1000]); $audio->addSubstitute($substitute); $this->assertNotNull($audio->getSubstitutes()->find($substitute->getKey())); }
protected function getNewMedia() { return Audio::create(['name' => '', 'path' => '', 'extension' => 'ext', 'mimetype' => 'audio/ogg', 'size' => 1000]); }