diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/Page/PropertyPageTest.php')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/Page/PropertyPageTest.php | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/Page/PropertyPageTest.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/Page/PropertyPageTest.php new file mode 100644 index 00000000..f7153e93 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/Page/PropertyPageTest.php @@ -0,0 +1,58 @@ +<?php + +namespace SMW\Tests\Page; + +use SMW\DIWikiPage; +use SMW\Page\PropertyPage; + +/** + * @covers \SMW\Page\PropertyPage + * @group semantic-mediawiki + * + * @license GNU GPL v2+ + * @since 3.0 + * + * @author mwjames + */ +class PropertyPageTest extends \PHPUnit_Framework_TestCase { + + private $title; + private $store; + private $propertySpecificationReqMsgBuilder; + + protected function setUp() { + parent::setUp(); + + $this->propertySpecificationReqMsgBuilder = $this->getMockBuilder( '\SMW\PropertySpecificationReqMsgBuilder' ) + ->disableOriginalConstructor() + ->getMock(); + + $this->store = $this->getMockBuilder( '\SMW\SQLStore\SQLStore' ) + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + + $this->title = DIWikiPage::newFromText( __METHOD__, SMW_NS_PROPERTY )->getTitle(); + } + + public function testCanConstruct() { + + $this->assertInstanceOf( + PropertyPage::class, + new PropertyPage( $this->title, $this->store, $this->propertySpecificationReqMsgBuilder ) + ); + } + + public function testGetHtml() { + + $instance = new PropertyPage( + $this->title, + $this->store, + $this->propertySpecificationReqMsgBuilder + ); + + $this->assertEquals( + '', + $instance->view() + ); + } +} |