wiki.techinc.nl/tests/phpunit/unit/includes/libs/Message/MessageParamTest.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
754 B
PHP
Raw Normal View History

<?php
namespace Wikimedia\Tests\Message;
use PHPUnit\Framework\TestCase;
use stdClass;
use Wikimedia\Message\MessageParam;
use Wikimedia\Message\ParamType;
use Wikimedia\TestingAccessWrapper;
/**
* @covers \Wikimedia\Message\MessageParam
*/
class MessageParamTest extends TestCase {
public function testGetType() {
$mp = $this->getMockForAbstractClass( MessageParam::class );
TestingAccessWrapper::newFromObject( $mp )->type = ParamType::RAW;
$this->assertSame( ParamType::RAW, $mp->getType() );
}
public function testGetValue() {
$dummy = new stdClass;
$mp = $this->getMockForAbstractClass( MessageParam::class );
TestingAccessWrapper::newFromObject( $mp )->value = $dummy;
$this->assertSame( $dummy, $mp->getValue() );
}
}