[ticket/251] Fix display of date of users upcoming birthdays

B3P-251
This commit is contained in:
Marc Alexander
2014-06-09 14:39:22 +02:00
parent a14139cf9a
commit 50737c5cff
3 changed files with 53 additions and 3 deletions

View File

@@ -0,0 +1,50 @@
<?php
/**
*
* @package testing
* @copyright (c) 2014 Board3 Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
/**
* @group functional
*/
class phpbb_functional_portal_birthday_list_test extends \board3\portal\tests\testframework\functional_test_case
{
public function setUp()
{
parent::setUp();
$this->login();
$this->admin_login();
$this->enable_board3_portal_ext();
}
public function test_setup_birthday()
{
$this->logout();
$uid = $this->create_user('portal_birthday_user');
if (!$uid)
{
$this->markIncomplete('Unable to create portal_user');
}
$this->login('portal_birthday_user');
$crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info&sid=' . $this->sid);
$form = $crawler->selectButton('Submit')->form();
$form->setValues(array(
'bday_day' => date('d', time() + 86400*2),
'bday_month' => date('m', time() + 86400*2),
'bday_year' => date('Y', time() + 86400*2),
));
$crawler = self::submit($form);
}
/**
* @depends test_setup_birthday
*/
public function test_after_announce()
{
$crawler = self::request('GET', 'app.php/portal');
$this->assertContains(date('d M', time() + 86400*2), $crawler->html());
}
}