for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SG\Tests\Cache;
use SG\Cache\GlossaryCache;
/**
* @covers \SG\Cache\GlossaryCache
*
* @ingroup Test
* @group SG
* @group SGExtension
* @group extension-semantic-glossary
* @license GNU GPL v2+
* @since 1.0
* @author mwjames
*/
class GlossaryCacheTest extends \PHPUnit_Framework_TestCase {
public function testGetDefaultCache() {
$instance = new GlossaryCache();
$this->assertInstanceOf(
'BagOStuff',
$instance->getCache()
);
}
public function testGetCacheType() {
$this->assertInternalType(
'integer',
$instance->getCacheType()
public function testGetKeys() {
$subject = $this->getMockBuilder( '\SMW\DIWikiPage' )
->disableOriginalConstructor()
->getMock();
$subject->expects( $this->once() )
->method( 'getSerialization' )
->will( $this->returnValue( 'Foo' ) );
'string',
$instance->getKeyForSubject( $subject )
$instance->getKeyForLingo()