Skip to content

Provides a listener which allows PHPUnit to load extensions without using inheritance. Extensions provide common convenience methods to your tests.

License

Notifications You must be signed in to change notification settings

giftcards/phpunit-test-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHPUnit Test Extension

Provides a listener which allows PHPUnit to load extensions without using inheritance. Extensions provide common convenience methods to your tests.

Installation

Configuration

To configure the listener simply register it in your phpunit.xml.dist file

<listeners>
    	<listener class="\GiftCards\TestExtension\Listener\AddTestCaseExtensionsListener">
        	<arguments>
         		<array>
            		<element>
              			<string>\GiftCards\Extensions\EntityExtension</string>
              			<string>\GiftCards\Extensions\OmniOrmExtension</string>
            		</element>
          		</array>
        	</arguments>
    	</listener>
 	</listeners>

Usage

From your test case you can use any of the public methods that are available from within your extension.

About

Provides a listener which allows PHPUnit to load extensions without using inheritance. Extensions provide common convenience methods to your tests.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages