PHPackages                             robier/tests-ignore-final - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. robier/tests-ignore-final

ActiveLibrary[Testing &amp; Quality](/categories/testing)

robier/tests-ignore-final
=========================

Mock final classes

210.3k↓33.3%1PHP

Since Jun 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/robier/tests-ignore-final)[ Packagist](https://packagist.org/packages/robier/tests-ignore-final)[ RSS](/packages/robier-tests-ignore-final/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Mock final classes
------------------

[](#mock-final-classes)

This library allows you to mock classes that have `final` keyword in their signature. This is accomplished by hooking up into autoload process and changing source code of the class on the fly.

This library was inspired by [dg/bypass-finals](https://github.com/dg/bypass-finals) library. I wanted to have same functionally but with different approach. I hope that this different approach will not have the same problems as dg/bypass-finals have with infection.

### Usage

[](#usage)

Let's say you have this class that you want to mock:

```
