public function __construct($value) { $this->value = $value; parent::__construct(sprintf('Value of type %s is not a mock class.', var_export(gettype($value), true))); }