mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-25 14:57:31 +00:00
661ad61486
* ci: WIP add PHP Unit Tests
* ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
* ci: Add phpunit tests
---------
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
44 lines
850 B
PHP
44 lines
850 B
PHP
<?php
|
|
|
|
declare( strict_types=1 );
|
|
|
|
namespace MediaWiki\Skins\Citizen\Tests\Partials;
|
|
|
|
use MediaWiki\Skins\Citizen\Partials\Footer;
|
|
use MediaWiki\Skins\Citizen\SkinCitizen;
|
|
use MediaWikiIntegrationTestCase;
|
|
|
|
/**
|
|
* @group Citizen
|
|
*/
|
|
class FooterTest extends MediaWikiIntegrationTestCase {
|
|
/**
|
|
* @covers \MediaWiki\Skins\Citizen\Partials\Footer::decorateFooterData
|
|
* @return void
|
|
*/
|
|
public function testDecorateFooterData() {
|
|
$partial = new Footer( new SkinCitizen() );
|
|
|
|
$data = [
|
|
'data-info' => [
|
|
'array-items' => [
|
|
[ 'name' => 'copyright' ]
|
|
]
|
|
]
|
|
];
|
|
|
|
$out = $partial->decorateFooterData( $data );
|
|
|
|
$this->assertArraySubmapSame( [
|
|
'data-info' => [
|
|
'array-items' => [
|
|
[
|
|
'name' => 'copyright',
|
|
'label' => wfMessage( 'citizen-page-info-copyright' )->text()
|
|
]
|
|
],
|
|
]
|
|
], $out );
|
|
}
|
|
}
|