Skip to content
Snippets Groups Projects
Commit 8b0414c8 authored by gloas's avatar gloas
Browse files

Ajout du type doc aux albums Vodeclic

parent 26cdb7bc
Branches
Tags 7.10.4
No related merge requests found
......@@ -375,6 +375,9 @@ class Class_Album extends Storm_Model_Abstract {
return $this->setTypeDocId(Class_TypeDoc::ARTEVOD);
}
public function beFormationVodeclic() {
return $this->setTypeDocId(Class_TypeDoc::VODECLIC);
}
public function isArteVOD() {
return $this->getTypeDocId() == Class_TypeDoc::ARTEVOD;
......
......@@ -158,13 +158,14 @@ class Class_TypeDoc extends Storm_Model_Abstract {
const EPUB = 102;
const OAI = 103;
const ARTEVOD = 104;
const VODECLIC = 105;
public static function getDefaultTypeDocs() {
return [self::LIVRE_NUM => 'Livres numérisés',
self::DIAPORAMA => 'Diaporamas',
self::EPUB => 'E-Books',
self::OAI => 'OAI',
self::ARTEVOD => 'Arte VOD'];
self::ARTEVOD => 'Arte VOD',self::VODECLIC => 'Formation Vodeclic'];
}
......
......@@ -38,6 +38,7 @@ class Class_WebService_Vodeclic_CatalogueParser {
public function startFormation($attributes) {
$this->_current_album = new Class_Album();
$this->_current_album->beFormationVodeclic();
$this->_albums[]= $this->_current_album;
}
......
......@@ -91,6 +91,12 @@ class VodeclicTest extends Storm_Test_ModelTestCase{
public function firstAlbumSafari2AnneeShouldBe2007 (){
$this->assertEquals('2007',$this->_first_album->getAnnee());
}
/** @test */
public function firstAlbumSafari2TypeDocShouldBeFormationVodeclic() {
$this->assertEquals('Formation Vodeclic',$this->_first_album->getTypeDoc()->getLabel());
}
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment