store = $this->getMockBuilder( '\SMW\Store' ) ->disableOriginalConstructor() ->getMockForAbstractClass(); } public function testCanConstruct() { $this->assertInstanceOf( AttachmentFormatter::class, new AttachmentFormatter( $this->store ) ); } public function testBuildHTML_OnEmptyAttachments() { $instance = new AttachmentFormatter( $this->store ); $this->assertIsString( $instance->buildHTML( [] ) ); } public function testBuildHTML_OnAttachments() { $item = \SMW\DIWikiPage::newFromText( 'Foo', NS_FILE ); $instance = new AttachmentFormatter( $this->store ); $this->assertIsString( $instance->buildHTML( [ $item ] ) ); } }