facebookarchive/FBMock

Mocking 'final' class fails but is not documented

Closed this issue · 1 comments

<?php

require_once __DIR__.'/init.php';

final class C { }

mock('C');

Expected behavior: mock, or mention in documentation about this limitation.

Actual behavior: PHP Fatal error: Class FBMockFramework_C_FBMock__Mock_FBMock__MockObject may not inherit from final class (C) in /Users/epriestley/src/FBMock/TestDoubleCreator.php(33) : eval()'d code on line 2