dev-master
9999999-dev http://github.com/FlorianWolters/PHP-Component-TestA set of assert methods for PHPUnit.
LGPL-3.0+
The Requires
- php >=5.3
The Development Requires
test phpunit assert assertion
Wallogit.com
2017 © Pedro Peláez
A set of assert methods for PHPUnit.
FlorianWolters\Component\Test is a simple-to-use PHP component that offers a set of assert methods for PHPUnit., (*2)
Extend the abstract class FlorianWolters\Component\Test\TestCaseAbstract instead of \PHPUnit_Framework_TestCase to use the assert methods., (*3)
This section lists the various assertion methods that are available in addition to the standard assertions listed here., (*4)
assertInterface(), (*5)
assertInterface(string $actual[, string $message = '']), (*6)
assertNotInterface() is the inverse of this assertion and takes the same arguments., (*7)
assertTrait(), (*8)
assertTrait(string $actual[, string $message = '']), (*9)
assertNotTrait() is the inverse of this assertion and takes the same arguments., (*10)
assertAbstractClass(), (*11)
assertAbstractClass(string $actual[, string $message = '']), (*12)
assertNotAbstractClass() is the inverse of this assertion and takes the same arguments., (*13)
assertCloneableClass(), (*14)
assertCloneableClass(string|object $actual[, string $message = '']), (*15)
assertNotCloneableClass() is the inverse of this assertion and takes the same arguments., (*16)
assertFinalClass(), (*17)
assertFinalClass(string|object $actual[, string $message = '']), (*18)
assertNotFinalClass() is the inverse of this assertion and takes the same arguments., (*19)
assertInstantiableClass(), (*20)
assertInstantiableClass(string|object $actual[, string $message = '']), (*21)
assertNotInstantiableClass() is the inverse of this assertion and takes the same arguments., (*22)
assertInternalClass(), (*23)
assertInternalClass(string|object $actual[, string $message = '']), (*24)
assertNotInternalClass() is the inverse of this assertion and takes the same arguments., (*25)
assertIterateableClass(), (*26)
assertIterateableClass(string|object $actual[, string $message = '']), (*27)
assertNotIterateableClass() is the inverse of this assertion and takes the same arguments., (*28)
assertNamespacedClass(), (*29)
assertNamespacedClass(string|object $actual[, string $message = '']), (*30)
assertNotNamespacedClass() is the inverse of this assertion and takes the same arguments., (*31)
assertUserDefinedClass(), (*32)
assertUserDefinedClass(string|object $actual[, string $message = '']), (*33)
assertNotUserDefinedClass() is the inverse of this assertion and takes the same arguments., (*34)
The best documentation for FlorianWolters\Component\Test are the unit tests, which are shipped in the package. You will find them installed into your PEAR repository, which on Linux systems is normally /usr/share/php/test., (*35)
FlorianWolters\Component\Test should be installed using the dependency manager Composer. Composer can be installed with PHP., (*36)
php -r "eval('?>'.file_get_contents('http://getcomposer.org/installer'));"
This will just check a few PHP settings and then download
composer.pharto your working directory. This file is the Composer binary. It is a PHAR (PHP archive), which is an archive format for PHP which can be run on the command line, amongst other things., (*37)Next, run the
installcommand to resolve and download dependencies:, (*38)
php composer.phar install
FlorianWolters\Component\Test should be installed using the PEAR installer. This installer is the PHP community's de-facto standard for installing PHP components., (*39)
pear channel-discover pear.florianwolters.de pear install --alldeps fw/Test
If you are creating a component that relies on FlorianWolters\Component\Test, please make sure that you add FlorianWolters\Component\Test to your component's composer.json file:, (*40)
{
"require-dev": {
"florianwolters/component-test": dev-master"
}
}
If you are creating a component that relies on FlorianWolters\Component\Test, please make sure that you add FlorianWolters\Component\Test to your component's package.xml file:, (*41)
<dependencies>
<required>
<package>
<name>Test</name>
<channel>pear.florianwolters.de</channel>
<min>0.1.0</min>
<max>0.1.99</max>
</package>
</required>
</dependencies>
If you want to patch or enhance this component, you will need to create a suitable development environment. The easiest way to do that is to install phix4componentdev:, (*42)
# phix4componentdev pear channel-discover pear.phix-project.org pear install phix/phix4componentdev
You can then clone the Git repository:, (*43)
# PHP-Component-Test git clone http://github.com/FlorianWolters/PHP-Component-Test
Then, install a local copy of this component's dependencies to complete the development environment:, (*44)
# build vendor/ folder phing build-vendor
To make life easier for you, common tasks (such as running unit tests, generating code review analytics, and creating the PEAR package) have been automated using phing. You'll find the automated steps inside the build.xml file that ships with the component., (*45)
Run the command phing in the component's top-level folder to see the full list of available automated tasks., (*46)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version., (*47)
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details., (*48)
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://gnu.org/licenses/lgpl.txt., (*49)
A set of assert methods for PHPUnit.
LGPL-3.0+
test phpunit assert assertion