dev-master
9999999-devAdd more functionality to default Laravel 5.1 TestCase.
MIT
The Requires
- php >=5.5.9
- illuminate/support ~5.1
- phpunit/phpunit ^4.7.6
by Maxim Lanin
laravel phpunit framework tests testcase
Wallogit.com
2017 © Pedro Peláez
Add more functionality to default Laravel 5.1 TestCase.
Add more functionality to default Laravel 5.1 TestCase., (*1)
PHP 5.5.9+ or HHVM 3.3+, Composer and Laravel 5.1+ are required., (*2)
To get the latest version of Laravel-Extend-TestCase, simply add the following line to the require block of your composer.json file., (*3)
"lanin/laravel-extend-testcase": "dev-master"
You'll then need to run composer install or composer update to download it and have the autoloader updated., (*4)
Once it was installed you don't have to register any ServiceProvider, Facade or publish any configs., (*5)
All you have to do is to extend your base Seeder class with \Lanin\TestCase\TestCase and you are ready to test!, (*6)
class TestCase extends \Lanin\TestCase\TestCase
/**
* Fin or create first user (id => 1).
*
* @return \Illuminate\Contracts\Auth\Authenticatable|static
*/
protected function firstUser();
/**
* Act like the first user.
*
* @return $this
*/
protected function actingAsFirstUser();
/**
* Asserts that the response JSON contains the given path.
* Example: $this->seeJsonMatchesPath('$.user.email');
*
* @param string $path
* @return $this
* @throws PHPUnitException
*/
protected function seeJsonMatchesPath($path);
/**
* Return value from the resulting JSON by path.
* Example: $email = $this->getValueFromJsonByPath('$.user.email');
*
* @param string $path
* @return mixed
*/
protected function getValueFromJsonByPath($path);
/**
* Asserts that the response doesn't contain the given header.
*
* @param string $headerName
* @return $this
*/
protected function dontSeeHeader($headerName);
/**
* Asserts that the response doesn't contain the given cookie.
*
* @param string $cookieName
* @return $this
*/
protected function dontSeeCookie($cookieName);
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities., (*7)
Add more functionality to default Laravel 5.1 TestCase.
MIT
laravel phpunit framework tests testcase