summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SiteTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SiteTest.php')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SiteTest.php94
1 files changed, 94 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SiteTest.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SiteTest.php
new file mode 100644
index 00000000..ea8ac112
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SiteTest.php
@@ -0,0 +1,94 @@
+<?php
+
+namespace SMW\Tests;
+
+use SMW\Site;
+
+/**
+ * @covers \SMW\Site
+ * @group semantic-mediawiki
+ *
+ * @license GNU GPL v2+
+ * @since 3.0
+ *
+ * @author mwjames
+ */
+class SiteTest extends \PHPUnit_Framework_TestCase {
+
+ public function testIsReadOnly() {
+
+ $this->assertInternalType(
+ 'boolean',
+ Site::isReadOnly()
+ );
+ }
+
+ public function testIsBlocked() {
+
+ $this->assertInternalType(
+ 'boolean',
+ Site::isBlocked()
+ );
+ }
+
+ public function testName() {
+
+ $this->assertInternalType(
+ 'string',
+ Site::name()
+ );
+ }
+
+ public function testWikiurl() {
+
+ $this->assertInternalType(
+ 'string',
+ Site::wikiurl()
+ );
+ }
+
+ public function testLanguageCode() {
+
+ $this->assertInternalType(
+ 'string',
+ Site::languageCode()
+ );
+ }
+
+ public function testIsCommandLineMode() {
+
+ $this->assertInternalType(
+ 'boolean',
+ Site::isCommandLineMode()
+ );
+ }
+
+ public function testIsCapitalLinks() {
+
+ $this->assertInternalType(
+ 'boolean',
+ Site::isCapitalLinks()
+ );
+ }
+
+ public function testStats() {
+
+ $this->assertInternalType(
+ 'array',
+ Site::stats()
+ );
+ }
+
+ public function testGetJobClasses() {
+
+ $this->assertInternalType(
+ 'array',
+ Site::getJobClasses()
+ );
+
+ $this->assertNotEmpty(
+ Site::getJobClasses( 'SMW' )
+ );
+ }
+
+}