Skip to content

Commit

Permalink
Corrected tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
shinde-rahul committed Feb 18, 2023
1 parent eefd898 commit 54b85cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/bundles/IntegrationsBundle/Tests/Unit/DTO/NoteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final class NoteTest extends TestCase
public function testGetterFunctions(): void
{
$note = 'This is note';
$type = Note::TYPE_ALERT;
$type = Note::TYPE_WARNING;

$noteObject = new Note($note, $type);

Expand All @@ -21,7 +21,7 @@ public function testGetterFunctions(): void
public function testGetterFunctionsThrowsException(): void
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage(sprintf('Type value can be either "%s" or "%s".', Note::TYPE_INFO, Note::TYPE_ALERT));
$this->expectExceptionMessage(sprintf('Type value can be either "%s" or "%s".', Note::TYPE_INFO, Note::TYPE_WARNING));

$noteObject = new Note('Notes', 'randomType');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testConfigFormNotesTraitFormForCustomValues(): void

public function getAuthorizationNote(): ?Note
{
return new Note('Authorisation', Note::TYPE_ALERT);
return new Note('Authorisation', Note::TYPE_WARNING);
}

public function getFeaturesNote(): ?Note
Expand All @@ -39,20 +39,20 @@ public function getFeaturesNote(): ?Note

public function getFieldMappingNote(): ?Note
{
return new Note('Field Mapping', Note::TYPE_ALERT);
return new Note('Field Mapping', Note::TYPE_WARNING);
}
};

$this->assertInstanceOf(Note::class, $configFormNotes->getAuthorizationNote());
$this->assertSame(Note::TYPE_ALERT, $configFormNotes->getAuthorizationNote()->getType());
$this->assertSame(Note::TYPE_WARNING, $configFormNotes->getAuthorizationNote()->getType());
$this->assertSame('Authorisation', $configFormNotes->getAuthorizationNote()->getNote());

$this->assertInstanceOf(Note::class, $configFormNotes->getFeaturesNote());
$this->assertSame(Note::TYPE_INFO, $configFormNotes->getFeaturesNote()->getType());
$this->assertSame('Features', $configFormNotes->getFeaturesNote()->getNote());

$this->assertInstanceOf(Note::class, $configFormNotes->getFieldMappingNote());
$this->assertSame(Note::TYPE_ALERT, $configFormNotes->getFieldMappingNote()->getType());
$this->assertSame(Note::TYPE_WARNING, $configFormNotes->getFieldMappingNote()->getType());
$this->assertSame('Field Mapping', $configFormNotes->getFieldMappingNote()->getNote());
}
}

0 comments on commit 54b85cf

Please sign in to comment.