Skip to content

Commit

Permalink
Dev: Some more namespace fixes in test
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jan 22, 2020
1 parent 02813fa commit 353749a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/unit/helpers/remotecontrol/CPDImportParticpantsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function testOneParticipantWithOwnIdImportedSuccessfully()
$this->assertArrayHasKey('ImportCount', $result);
$this->assertEquals(1, $result['ImportCount']);

$max = Participant::model()->findByPk('max');
$max = \Participant::model()->findByPk('max');
$this->assertInstanceOf('Participant', $max);

}
Expand Down Expand Up @@ -110,9 +110,9 @@ public function testImportingParticipantFailsDueToSameFirstnameLastnameEmail()

public function testParticipantWithOneAttributeImportedSucessfully()
{
Yii::app()->session['adminlang'] = 'de';
$this->assertTrue(empty(ParticipantAttributeName::model()->findAll()));
$result = ParticipantAttributeName::model()->storeAttribute(array(
\Yii::app()->session['adminlang'] = 'de';
$this->assertTrue(empty(\ParticipantAttributeName::model()->findAll()));
$result = \ParticipantAttributeName::model()->storeAttribute(array(
'attribute_type' => 'TB',
'defaultname' => 'website',
'visible' => 'TRUE',
Expand All @@ -137,18 +137,18 @@ public function testParticipantWithOneAttributeImportedSucessfully()
$this->assertArrayHasKey('ImportCount', $result);
$this->assertEquals(1, $result['ImportCount']);

$max = Participant::model()->findByPk('max');
$this->assertInstanceOf(Participant::class, $max);
$max = \Participant::model()->findByPk('max');
$this->assertInstanceOf(\Participant::class, $max);

$attribute = $max->getParticipantAttribute('ea_1');
$this->assertEquals('http://www.example.com', $attribute);
}

public function testParticipantUpdatedSuccessfullyWhenUpdateTrue()
{
Yii::app()->session['adminlang'] = 'de';
$this->assertTrue(empty(ParticipantAttributeName::model()->findAll()));
$result = ParticipantAttributeName::model()->storeAttribute(array(
\Yii::app()->session['adminlang'] = 'de';
$this->assertTrue(empty(\ParticipantAttributeName::model()->findAll()));
$result = \ParticipantAttributeName::model()->storeAttribute(array(
'attribute_type' => 'TB',
'defaultname' => 'website',
'visible' => 'TRUE',
Expand Down Expand Up @@ -184,8 +184,8 @@ public function testParticipantUpdatedSuccessfullyWhenUpdateTrue()
$this->assertArrayHasKey('UpdateCount', $result);
$this->assertEquals(1, $result['UpdateCount']);

$max = Participant::model()->findByPk('max');
$this->assertInstanceOf(Participant::class, $max);
$max = \Participant::model()->findByPk('max');
$this->assertInstanceOf(\Participant::class, $max);

$attribute = $max->getParticipantAttribute('ea_1');
$this->assertEquals('http://www.example.org', $attribute);
Expand Down

0 comments on commit 353749a

Please sign in to comment.