mediawiki-skins-Citizen/tests/phpunit/Partials/FooterTest.php
H. C. Kruse 661ad61486
ci: add PHPUnit tests (#712)
* 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>
2023-08-25 14:39:37 -07:00

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 );
}
}