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

dev #73311 add redmine login and php version in system report

parent a9dc73d2
Branches
Tags
2 merge requests!2583dev #73311 add redmine login and php version in system report,!2576dev #73311 add redmine login and php version in system report
Pipeline #3797 passed with stage
in 47 minutes and 8 seconds
- ticket #73311 : Ajout d'indicateurs dans le rapport système
\ No newline at end of file
......@@ -79,6 +79,8 @@ class Class_Systeme_Report_Headers extends Class_Systeme_Report_Abstract {
$this->_('Base de données'),
array_at('dbname',
Zend_Db_Table::getDefaultAdapter()->getConfig()));
$visitor->visitData('php', $this->_('PHP'), PHP_VERSION);
}
}
......@@ -222,7 +224,8 @@ class Class_Systeme_Report_Libraries extends Class_Systeme_Report_Abstract {
'address' => $this->_('Adresse'),
'postal_code' => $this->_('CP'),
'city' => $this->_('Ville'),
'coordinates' => $this->_('Coordonnées')]);
'coordinates' => $this->_('Coordonnées'),
'redmine_login' => $this->_('Compte forge')]);
foreach(Class_Bib::findAll() as $library)
$this->_reportLibrary($library, $visitor);
......@@ -236,7 +239,8 @@ class Class_Systeme_Report_Libraries extends Class_Systeme_Report_Abstract {
'postal_code' => $library->getCp(),
'city' => $library->getVille(),
'coordinates' => ['latitude' => $library->getLatitude(),
'longitude' => $library->getLongitude()]]);
'longitude' => $library->getLongitude()],
'redmine_login' => $library->getRedmineLogin()]);
}
}
......
......@@ -28,7 +28,7 @@ class ZendAfi_View_Helper_Status_HtmlTest extends ZendAfi_View_Helper_Status_Tes
public function setUp() {
parent::setUp();
$disk = Storm_Test_ObjectWrapper::mock()
$disk = $this->mock()
->whenCalled('diskSpaceInfo')
->answers((new Class_Entity)
->setFree('0 o')
......@@ -66,6 +66,14 @@ class ZendAfi_View_Helper_Status_HtmlTest extends ZendAfi_View_Helper_Status_Tes
}
/** @test */
public function phpVersionShouldBePresent() {
$this->assertXPathContentContains($this->_html,
'//dl/dd[preceding-sibling::dt[text()="PHP"]]',
PHP_VERSION);
}
/** @test */
public function uniqueIdentifierShouldBe2345abc() {
$this->assertXPathContentContains($this->_html,
......@@ -196,6 +204,12 @@ class ZendAfi_View_Helper_Status_HtmlTest extends ZendAfi_View_Helper_Status_Tes
}
/** @test */
public function libraryAstaingRedmineLoginShouldBePresent() {
$this->assertXPathContentContains($this->_html, '//td', '@account@sigb-opac');
}
/** @test */
public function variableOnOffBibnumShouldBeDisplayed() {
$this->assertXPathContentContains($this->_html,
......
......@@ -57,6 +57,12 @@ class ZendAfi_View_Helper_Status_JsonTest extends ZendAfi_View_Helper_Status_Tes
}
/** @test */
public function phpVersionShouldBePresent() {
$this->assertEquals(PHP_VERSION, $this->_report['headers']['php']);
}
/** @test */
public function headersBUIDShouldBeGenerated() {
$this->assertNotEmpty($this->_report['headers']['buid']);
......@@ -369,16 +375,15 @@ class ZendAfi_View_Helper_Status_JsonTest extends ZendAfi_View_Helper_Status_Tes
/** @test */
public function librayAnstaingShouldDisplayAdressAndCoordinates() {
$this->assertContains(['label' => 'Anstaing / Bibliothèque municipale',
'address' => "Place Jules Guesde",
'postal_code' => "59152",
"city" => "Anstaing",
"coordinates" => [
"latitude"=> "11111",
"longitude" => "22222"]
'address' => 'Place Jules Guesde',
'postal_code' => '59152',
'city' => 'Anstaing',
'coordinates' => [
'latitude'=> '11111',
'longitude' => '22222'],
'redmine_login' => '@account@sigb-opac',
],
$this->_report['libraries']);
}
......
......@@ -142,7 +142,8 @@ abstract class ZendAfi_View_Helper_Status_TestCase extends ViewHelperTestCase {
'adresse' => 'Place Jules Guesde',
'cp' => '59152', 'ville' => 'Anstaing',
'lieu' => $anstaing,
'visibilite' => 2]);
'visibilite' => 2,
'redmine_login' => '@account@sigb-opac']);
Class_AdminVar::newInstanceWithId('KOHA_MULTI_SITES', ['valeur' => '' ]);
return $this;
......
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