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

rel #43603 : can choose to take barcodes from 949$6 in record profile modification

parent 4cfb6448
2 merge requests!1702Dev#43603 lille metro cosmogramme possibilite de pointer le code barre dans le champ 9496,!1685Dev#43603 lille metro cosmogramme possibilite de pointer le code barre dans le champ 9496
- ticket #43603 : Cosmogramme : possibilité de prendre les code barre exemplaires dans le champ 949$6
\ No newline at end of file
......@@ -61,7 +61,7 @@ abstract class Cosmo_DataProfileControllerTestCase extends CosmoControllerTestCa
$this->fixture('Class_CosmoVar',
['id' => 'champ_code_barres',
'valeur' => null,
'liste' => "f:995$f\r\nh:995$h\r\nb:995$b\r\n997:997$a\r\n852:852$g\r\na:995$a\r\n999:999$i\r\n996:996$f"]);
'liste' => "f:995$f\r\nh:995$h\r\nb:995$b\r\n997:997$a\r\n852:852$g\r\na:995$a\r\n999:999$i\r\n996:996$f\r\n949:949$6"]);
$this->fixture('Class_CosmoVar',
['id' => 'champ_cote',
......@@ -259,6 +259,12 @@ class Cosmo_DataProfileControllerEditUnimarcKohaTest extends Cosmo_DataProfileCo
}
/** @test */
public function itemCodebarreIn949Dollar6ShouldBePresent() {
$this->assertXPath('//form//select[@id="champ_code_barres"]/option[@value="949"][@label="949$6"]');
}
/** @test */
public function itemCoteShouldBePresent() {
$this->assertXPath('//form//select[@id="champ_cote"]/option[@value="k"][@selected]');
......
<?php
error_reporting(E_ERROR | E_PARSE);
define("PATCH_LEVEL","299");
define("PATCH_LEVEL","300");
define("APPLI","cosmogramme");
define("COSMOPATH", "/var/www/html/vhosts/opac2/www/htdocs");
......
<?php
$adapter = Zend_Db_Table_Abstract::getDefaultAdapter();
try {
$adapter->query('update variables set liste=\'f:995$f\r\nh:995$h\r\nb:995$b\r\n997:997$a\r\n852:852$g\r\na:995$a\r\n999:999$i\r\n996:996$f\r\n949:949$6\' where clef=\'champ_code_barres\'');
} catch(Exception $e) {}
......@@ -755,4 +755,20 @@ class UpgradeDB_299_Test extends UpgradeDBTestCase {
$this->assertEquals('https://websvc.afi-sa.net/afi_opac_services/main.php',
Class_CosmoVar::get('url_services'));
}
}
class UpgradeDB_300_Test extends UpgradeDBTestCase {
public function prepare() {
$this->query('update variables set liste=\'f:995$f\r\nh:995$h\r\nb:995$b\r\n997:997$a\r\n852:852$g\r\na:995$a\r\n999:999$i\r\n996:996$f\' where clef=\'champ_code_barres\'');
}
/** @test */
public function barcodeFieldsShouldContains949Dollar6() {
$this->assertContains("\r\n" . '949:949$6',
$this->query('select liste from variables where clef=\'champ_code_barres\'')
->fetch()['liste']);
}
}
\ 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