class NoInstantiationMockStaticCallable

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php \Drupal\Tests\Core\Utility\NoInstantiationMockStaticCallable

Hierarchy

Expanded class hierarchy of NoInstantiationMockStaticCallable

File

core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php, line 228

Namespace

Drupal\Tests\Core\Utility
View source
class NoInstantiationMockStaticCallable {
    public function __construct() {
        throw new \Exception(sprintf('The class %s should not require instantiation for the static method to be called.', __CLASS__));
    }
    public static function staticMethod($suffix) {
        return __METHOD__ . '+' . $suffix;
    }

}

Members


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.