container = $app->getContainer(); } public function testUpdateWithoutGuidDoesNotNullGuid() : void { /** @var EpisodeActionSaver $episodeActionSaver */ $episodeActionSaver = $this->container->get(EpisodeActionSaver::class); $episodeUrl = uniqid("test_https://dts.podtrac.com/redirect.mp3/chrt.fm/track"); $guid = uniqid("test_gid://art19-episode-locator/V0/Ktd"); $savedEpisodeActionEntity = $episodeActionSaver->saveEpisodeActions( "[EpisodeAction{podcast='https://rss.art19.com/dr-death-s3-miracle-man', episode='{$episodeUrl}', guid='{$guid}', action=PLAY, timestamp=Mon Aug 23 01:58:56 GMT+02:00 2021, started=47, position=54, total=2252}]", self::USER_ID_0 )[0]; $savedEpisodeActionEntityWithoutGuidFromOldDevice = $episodeActionSaver->saveEpisodeActions( "[EpisodeAction{podcast='https://rss.art19.com/dr-death-s3-miracle-man', episode='{$episodeUrl}', action=PLAY, timestamp=Mon Aug 23 01:58:56 GMT+02:00 2021, started=47, position=54, total=2252}]", self::USER_ID_0 )[0]; self::assertSame($savedEpisodeActionEntity->getId(), $savedEpisodeActionEntityWithoutGuidFromOldDevice->getId()); self::assertNotNull($savedEpisodeActionEntityWithoutGuidFromOldDevice->getGuid()); } }