Simply install via Composer:
composer require nico-vromans/phpspec-matchers
After that, add the extension to you phpspec.yml
:
extensions:
NicoVromans\PhpSpecMatchers\Extension: ~
This checks if the tested class is a final class.
To test if a class is final:
$this->shouldBeFinal();
or if a class is not final:
$this->shouldNotBeFinal();
For more info on custom extensions, check out PhpSpec's Extensions manual. For some more examples look at the Example extensions section.
GNU General Public License v3.0, check LICENSE for more information.