Skip to content

Commit

Permalink
Test if Profile's toArray returns the correct information
Browse files Browse the repository at this point in the history
  • Loading branch information
StijnVrolijk committed Mar 6, 2018
1 parent cad9074 commit cb5acc4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Frontend/Modules/Profiles/Tests/Engine/ProfileTest.php
Expand Up @@ -2,6 +2,7 @@

namespace Frontend\Modules\Profiles\Tests\Engine;

use Frontend\Modules\Profiles\Engine\Model;
use Common\WebTestCase;
use Frontend\Modules\Profiles\Engine\Profile;

Expand All @@ -15,6 +16,10 @@ public function setUp(): void
define('APPLICATION', 'Frontend');
}

if (!defined('LANGUAGE')) {
define('LANGUAGE', 'en');
}

$client = self::createClient();
$this->loadFixtures($client);
}
Expand Down Expand Up @@ -55,6 +60,12 @@ public function testCreatingProfile(): void
$this->assertEquals('My first value', $profile->getSetting('my_first_setting'));
$profile->setSetting('my_second_setting', 'My updated value');
$this->assertEquals('My updated value', $profile->getSetting('my_second_setting'));*/
$this->assertEquals('My updated value', $profile->getSetting('my_second_setting'));
$profileArray = $profile->toArray();
$this->assertArrayHasKey('display_name', $profileArray);
$this->assertEquals('Fork CMS', $profileArray['display_name']);
$this->assertArrayHasKey('registered_on', $profileArray);
$this->assertEquals(1234567890, $profileArray['registered_on']);*/
}
}

0 comments on commit cb5acc4

Please sign in to comment.