Skip to content
Snippets Groups Projects

hotline#191593 : ArteVOD : donot delete records unless update is ON

All threads resolved!
Compare and Show latest version
1 file
+ 16
17
Preferences
Compare changes
@@ -345,32 +345,25 @@ class ArteVodHarverstingNewApiUpdateTest extends ArteVodHarverstingTestCase {
class ArteVodHarverstingNewApiUsualModeTest extends ArteVodHarverstingTestCase {
protected $_heroines;
public function setUp() {
parent::setUp();
ArteVod_Service::setTimeSource(new TimeSourceForTest('2022-01-07'));
$this->fixture(Class_CodifMatiere::class,
['id'=>1,
'libelle' =>'My added subject',
'code_apha' =>'ADDED_SUBJECT'] );
$this->_album = $this->fixture(Class_Album::class,
['id' => 20,
'type_doc_id' => 'ArteVod',
'titre' => 'Héros',
'id_origine' => '7040',
'matiere' => '1',
'url_origine' =>'https://mednumv3-backapi.lab.arte.tv/api/v1/',
'fichier' =>'596525_b88c86285df723b8e5c0f819b132f39f.jpeg',
'external_uri' => 'https://vod.mediatheque-numerique.com/films/heroines']);
$this->fixture(Class_Album::class,
['id' => 20,
'type_doc_id' => 'ArteVod',
'titre' => 'Héros',
'id_origine' => '7040',
'matiere' => '1',
'url_origine' =>'https://mednumv3-backapi.lab.arte.tv/api/v1/',
'fichier' =>'596525_b88c86285df723b8e5c0f819b132f39f.jpeg',
'external_uri' => 'https://vod.mediatheque-numerique.com/films/heroines']);
$this->fixture(Class_Album::class,
['id' => 601,
'type_doc_id' => 'ArteVod',
'titre' => 'SupprimeMoi',
'titre' => 'Un autre album',
'id_origine' => '704123',
'matiere' => '1',
'date_maj' => '2022-01-05']);
@@ -405,6 +398,12 @@ class ArteVodHarverstingNewApiUsualModeTest extends ArteVodHarverstingTestCase {
public function albumHeroinesShouldNotBeNull() {
$this->assertNotNull(Class_Album::find(20));
}
/** @test */
public function albumCountShouldBe2() {
$this->assertEquals(Class_Album::count(), 2);
}
}