Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (2)
- ticket #88956 : Rapport système : Ajout du niveau de base de données attendu et courant pour un meilleur diagnostique des mises à jours
\ No newline at end of file
......@@ -81,6 +81,12 @@ 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('patch_level',
$this->_('Niveau de patch'),
['expected' => (string)(new Class_Migration_Patchs)->getLastPatchNumber(),
'actual' => Class_CosmoVar::get('patch_level')]);
$visitor->visitData('php', $this->_('PHP'), PHP_VERSION);
}
}
......
......@@ -754,14 +754,39 @@ class IndexControllerStatusTest extends AbstractControllerTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('ALLOWED_DISK_SPACE', 1);
Class_CosmoVar::set('patch_level', '369');
$filesystem = $this->mock()
->whenCalled('glob')
->answers(['cosmogramme/sql/patch/patch_372.php']);
Class_Migration_Patchs::setFileSystem($filesystem);
$this->dispatch('/opac/index/status', true);
$this->_json = json_decode($this->_response->getBody(), true);
}
public function tearDown() {
Class_Migration_Patchs::setFileSystem(null);
parent::tearDown();
}
/** @test */
public function dateCreationShouldBeSet() {
$this->assertNotNull($this->_json['headers']['creation_datetime'], $this->_json);
$this->assertNotNull($this->_json['headers']['creation_datetime']);
}
/** @test */
public function actualPatchLevelShouldBe369() {
$this->assertEquals('369', $this->_json['headers']['patch_level']['actual']);
}
/** @test */
public function expectedPatchLevelShouldBeLastPatchNumber() {
$this->assertEquals('372', $this->_json['headers']['patch_level']['expected']);
}
}
......