Skip to content
Snippets Groups Projects
Commit 4e68882f authored by Patrick Barroca's avatar Patrick Barroca :grin: Committed by gloas
Browse files

Test fixture update

parent 9ffc5905
Branches
Tags
1 merge request!258Dev/13872 Orphee Allow Hold Available Items
......@@ -37,31 +37,31 @@ class TypeDocTest extends Storm_Test_ModelTestCase {
/** @test */
function instancesCountShouldBeAtLeastHeight() {
public function instancesCountShouldBeAtLeastHeight() {
$this->assertTrue(8 <= count($this->types_docs));
}
/** @test */
function firstInstanceIdShouldEqualsZero() {
public function firstInstanceIdShouldEqualsZero() {
$this->assertEquals(0, array_first($this->types_docs)->getId());
}
/** @test */
function firstInstanceLabelShouldBeNonIdentifie() {
public function firstInstanceLabelShouldBeNonIdentifie() {
$this->assertEquals('non identifié', array_first($this->types_docs)->getLabel());
}
/** @test */
function thirdInstanceIdShouldBeTwo() {
public function thirdInstanceIdShouldBeTwo() {
$this->assertEquals(2, array_at(2, $this->types_docs)->getId());
}
/** @test */
function thirdInstanceLabelShouldBePeriodiques() {
public function thirdInstanceLabelShouldBePeriodiques() {
$this->assertEquals('périodiques', array_at(2, $this->types_docs)->getLabel());
}
......@@ -78,16 +78,7 @@ class TypeDocTest extends Storm_Test_ModelTestCase {
/** @test */
function saveNewInstanceVideoShouldUpdateTypesDocsVars() {
Class_TypeDoc::newWithLabel('videos')->save();
$this->assertContains("106:Livres numériques\r\n107:Vidéos à la demande\r\n108:Cours en ligne\r\n109:Enregistrement audio\r\n110:videos",
$this->cosmo_types->getListe());
}
/** @test */
function saveModifiedPeriodiquesShouldUpdateTypesDocsVars() {
public function saveModifiedPeriodiquesShouldUpdateTypesDocsVars() {
array_at(2, $this->types_docs)
->setLabel('journaux')
->save();
......@@ -99,7 +90,7 @@ class TypeDocTest extends Storm_Test_ModelTestCase {
/** @test */
function saveNewInstancesVideoAndCDShouldUpdateTypesDocsVar() {
public function saveNewInstancesVideoAndCDShouldUpdateTypesDocsVar() {
Class_TypeDoc::getLoader()
->newInstance()
->setLabel('videos')
......@@ -110,14 +101,14 @@ class TypeDocTest extends Storm_Test_ModelTestCase {
->setLabel('CD')
->save();
$this->assertContains("107:Vidéos à la demande\r\n108:Cours en ligne\r\n109:Enregistrement audio\r\n110:videos\r\n111:CD",
$this->assertContains("107:Vidéos à la demande\r\n108:Cours en ligne\r\n109:Enregistrement audio\r\n110:Numérique Premium\r\n111:videos\r\n112:CD",
$this->cosmo_types->getListe(),
'Current value: '.$this->cosmo_types->getListe());
}
/** @test */
function deleteLivresShouldUpdateTypesDocsVar() {
public function deleteLivresShouldUpdateTypesDocsVar() {
array_at(1, $this->types_docs)->delete();
$this->assertContains("0:non identifié\r\n2:périodiques\r\n3:Disques",
......@@ -126,7 +117,7 @@ class TypeDocTest extends Storm_Test_ModelTestCase {
/** @test */
function typeDocToIdLabelArrayShouldAnswerAssociativeArray() {
public function typeDocToIdLabelArrayShouldAnswerAssociativeArray() {
$array = Class_TypeDoc::toIdLabelArray(Class_TypeDoc::getLoader()->findAll());
$this->assertContains(implode(' ', [0 => 'non identifié',
1 => 'livres',
......@@ -137,13 +128,13 @@ class TypeDocTest extends Storm_Test_ModelTestCase {
/** @test */
function loaderFindTwoShouldReturnPeriodiques() {
public function loaderFindTwoShouldReturnPeriodiques() {
$this->assertEquals('périodiques', Class_TypeDoc::getLoader()->find(2)->getLabel());
}
/** @test */
function loaderFind999ShouldReturnNull() {
public function loaderFind999ShouldReturnNull() {
$this->assertEquals(null, Class_TypeDoc::getLoader()->find(999));
}
}
......
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