Continued:
[core.git] / tests / framework / config / FrameworkConfigurationTest.php
index d3e8ccd5fc7d992d696bd702d705978443505597..329e01ca996b22359d3444e7a78959e7142393b9 100644 (file)
@@ -7,6 +7,7 @@ namespace CoreFramework\Configuration;
 use CoreFramework\Console\Tools\ConsoleTools;
 use CoreFramework\Loader\ClassLoader;
 use CoreFramework\Generic\NullPointerException;
+use CoreFramework\Generic\UnsupportedOperationException;
 
 // Import PHPUnit stuff
 use PHPUnit\Framework\Error\Notice;
@@ -904,4 +905,30 @@ class FrameworkConfigurationTest extends TestCase {
                self::$configInstance->setServerAddress(self::$ipAddress);
        }
 
+       /**
+        * Tests if the method getField() is still unsupported in this class. Please
+        * note, that this and isFieldSet() may get removed in the future. So also
+        * these test methods will be gone.
+        */
+       public function testConfigGetFieldUnsupported () {
+               // Expect this exception
+               $this->expectException(UnsupportedOperationException::class);
+
+               // Test it
+               $dummy = self::$configInstance->getField('foo');
+       }
+
+       /**
+        * Tests if the method isFieldSet() is still unsupported in this class. Please
+        * note, that this and getField() may get removed in the future. So also
+        * these test methods will be gone.
+        */
+       public function testConfigIsFieldSetUnsupported () {
+               // Expect this exception
+               $this->expectException(UnsupportedOperationException::class);
+
+               // Test it
+               $dummy = self::$configInstance->isFieldSet('foo');
+       }
+
 }