Skip to content
Snippets Groups Projects
Commit de7218b2 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

dev #50215 remove Bibliondemand from available doctypes

parent e85cb542
Branches
Tags
5 merge requests!2102#57574 : correction orthographe des jours de la semaine,!2080Sandbox detach zf from storm,!2061Master,!2052Dev#50215 explo st omer henin arques sso avec portail departemental fin moissonnage oai,!2049Dev#50215 explo st omer henin arques sso avec portail departemental fin moissonnage oai
Pipeline #541 failed with stage
in 10 minutes and 9 seconds
...@@ -41,6 +41,7 @@ abstract class Cosmo_DataProfileControllerDublinCoreProfileTestCase extends Cosm ...@@ -41,6 +41,7 @@ abstract class Cosmo_DataProfileControllerDublinCoreProfileTestCase extends Cosm
class Cosmo_DataProfileControllerDublinCoreTest extends Cosmo_DataProfileControllerDublinCoreProfileTestCase { class Cosmo_DataProfileControllerDublinCoreTest extends Cosmo_DataProfileControllerDublinCoreProfileTestCase {
public function setUp() { public function setUp() {
parent::setUp(); parent::setUp();
...@@ -48,28 +49,35 @@ class Cosmo_DataProfileControllerDublinCoreTest extends Cosmo_DataProfileControl ...@@ -48,28 +49,35 @@ class Cosmo_DataProfileControllerDublinCoreTest extends Cosmo_DataProfileControl
} }
/** @test */ /** @test */
public function fileFormatShouldBeDublinCore() { public function fileFormatShouldBeDublinCore() {
$this->assertXPath('//select/option[@label="Dublin Core"][@value="9"][@selected]'); $this->assertXPath('//select/option[@label="Dublin Core"][@value="9"][@selected]');
} }
/** @test */ /** @test */
public function fieldsetDocTypesShouldBePresent() { public function fieldsetDocTypesShouldBePresent() {
$this->assertXPathContentContains('//form//fieldset/legend', $this->assertXPathContentContains('//form//fieldset/legend',
'Type de documents'); 'Type de documents');
} }
/** @test */ /** @test */
public function typeDocColumnLabelsShouldBeTypeAndFormat() { public function typeDocColumnLabelsShouldBeTypeAndFormat() {
$this->assertXPathContentContains('//script', $this->assertXPathContentContains('//script',
'fields:[{"name":"1_type","label":"dc:Type"},{"name":"1_format","label":"dc:Format"}]'); 'fields:[{"name":"1_type","label":"dc:Type"},{"name":"1_format","label":"dc:Format"}]');
} }
/** @test */
public function docTypeBibliondemandShouldNotBePresent() {
$this->assertNotXPathContentContains('//script', 'Bibliondemand', $this->_response->getBody());
}
} }
class Cosmo_DataProfileControllerDublinCorePostTest extends Cosmo_DataProfileControllerDublinCoreProfileTestCase { class Cosmo_DataProfileControllerDublinCorePostTest extends Cosmo_DataProfileControllerDublinCoreProfileTestCase {
public function setUp() { public function setUp() {
parent::setUp(); parent::setUp();
......
...@@ -189,7 +189,10 @@ class Class_DigitalResource extends Class_Entity { ...@@ -189,7 +189,10 @@ class Class_DigitalResource extends Class_Entity {
->injectInto([], ->injectInto([],
function($types, $config) function($types, $config)
{ {
$types[$this->getDocType($config->getName())] = $config->getDocTypeLabel(); if(!$label = $config->getDocTypeLabel())
return $types;
$types[$this->getDocType($config->getName())] = $label;
return $types; return $types;
} }
); );
......
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