diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/PropertyAnnotators/NullPropertyAnnotatorTest.php')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/PropertyAnnotators/NullPropertyAnnotatorTest.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/PropertyAnnotators/NullPropertyAnnotatorTest.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/PropertyAnnotators/NullPropertyAnnotatorTest.php new file mode 100644 index 00000000..ff2b5e5c --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/PropertyAnnotators/NullPropertyAnnotatorTest.php @@ -0,0 +1,50 @@ +<?php + +namespace SMW\Tests\PropertyAnnotators; + +use SMW\PropertyAnnotators\NullPropertyAnnotator; + +/** + * @covers \SMW\PropertyAnnotators\NullPropertyAnnotator + * @group semantic-mediawiki + * + * @license GNU GPL v2+ + * @since 1.9 + * + * @author mwjames + */ +class NullPropertyAnnotatorTest extends \PHPUnit_Framework_TestCase { + + public function testCanConstruct() { + + $semanticData = $this->getMockBuilder( '\SMW\SemanticData' ) + ->disableOriginalConstructor() + ->getMock(); + + $this->assertInstanceOf( + '\SMW\PropertyAnnotators\NullPropertyAnnotator', + new NullPropertyAnnotator( $semanticData ) + ); + } + + public function testMethodAccess() { + + $semanticData = $this->getMockBuilder( '\SMW\SemanticData' ) + ->disableOriginalConstructor() + ->getMock(); + + $instance = new NullPropertyAnnotator( $semanticData ); + + $this->assertInstanceOf( + '\SMW\SemanticData', + $instance->getSemanticData() + ); + + $this->assertInstanceOf( + '\SMW\PropertyAnnotators\NullPropertyAnnotator', + $instance->addAnnotation() + ); + + } + +} |