Skip to content

Commit

Permalink
Version 1.0 Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgaber committed Jun 1, 2020
1 parent c7b3dbe commit 78c2c4a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
# NovaUnit

[![Latest Version on Packagist](https://img.shields.io/packagist/v/joshgaber/novaunit.svg?style=flat-square)](https://packagist.org/packages/joshgaber/novaunit)
[![Build Status](https://scrutinizer-ci.com/g/joshgaber/novaunit/badges/build.png)](https://scrutinizer-ci.com/g/joshgaber/novaunit/build-status/master)
[![Build Status](https://travis-ci.org/joshgaber/NovaUnit.svg)](https://travis-ci.org/joshgaber/NovaUnit)
[![Code Coverage](https://scrutinizer-ci.com/g/joshgaber/novaunit/badges/coverage.png)](https://scrutinizer-ci.com/g/joshgaber/novaunit/)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/joshgaber/novaunit/badges/quality-score.png)](https://scrutinizer-ci.com/g/joshgaber/novaunit/)
[![StyleCI](https://github.styleci.io/repos/261879333/shield)](https://github.styleci.io/repos/261879333)
[![Total Downloads](https://img.shields.io/packagist/dt/joshgaber/novaunit.svg?style=flat-square)](https://packagist.org/packages/joshgaber/novaunit)

NovaUnit is a unit-testing package for Laravel Nova, built using PHPUnit.
NovaUnit is a unit-testing package for Laravel Nova, built using PHPUnit. NovaUnit provides you with assertions for Nova Actions, Lenses and Resources, so you can create great administration panels with confidence.

## Installation

You can install the package via composer:
You can install the package in your Laravel Project via composer:

```sh
composer require joshgaber/novaunit
composer require --dev joshgaber/novaunit
```

### Requirements

* PHP 7.2 or higher
* [Laravel](https://laravel.com/) 6.x - 7.x
* [Laravel Nova](https://nova.laravel.com/) 2.x - 3.x
* [PHPUnit](https://github.com/sebastianbergmann/phpunit) 8.x - 9.x

## Usage

To access the test classes, import and use the base test traits:
Expand All @@ -36,7 +43,7 @@ $this->novaAction(ClearLogs::class)
->assertHasField('since_date');
```

For a list of available methods, see the [full docs site](https://joshgaber.github.io/NovaUnit/).
For a list of available methods, see the [full docs site](https://joshgaber.github.io/NovaUnit/index.html).

### Changelog

Expand Down
17 changes: 12 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# NovaUnit

NovaUnit is a unit-testing package for Laravel Nova, built using PHPUnit.
NovaUnit is a unit-testing package for Laravel Nova, built using PHPUnit. NovaUnit provides you with assertions for Nova Actions, Lenses and Resources, so you can create great administration panels with confidence.

## Installation

You can install the package via composer:
You can install this package into your Laravel project via composer:

```sh
composer require joshgaber/novaunit
composer require --dev joshgaber/novaunit
```

### Requirements

* PHP 7.2 or higher
* [Laravel](https://laravel.com/) 6.x - 7.x
* [Laravel Nova](https://nova.laravel.com/) 2.x - 3.x
* [PHPUnit](https://github.com/sebastianbergmann/phpunit) 8.x - 9.x

## Usage

NovaUnit can be used to perform assertions on Actions, Lenses and Resources.

To access the test classes, import and use the base test traits:

```php
Expand Down
8 changes: 4 additions & 4 deletions docs/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To create the testing object for a Nova Action, add the test trait to your class
```php
class TestClass extends TestCase
{
use \NovaUnit\Actions\NovaActionTest;
use NovaActionTest;

public function testNovaAction()
{
Expand All @@ -34,7 +34,7 @@ $action->handle($fields, $models);
Invokes the `handle` method on the action with the given parameters.

* `$fields` - A key-value array with the input values of the action fields, indexed by attribute. Eg., `['name' => 'John Smith']`
* `$models` - A list of the models to apply the action to. Value can be either an array, an Eloquent collection, or a single Model.
* `$models` - A list of the models to apply the action to. Value can be either an array, an Eloquent collection, or a single Model.

## Lenses

Expand All @@ -43,7 +43,7 @@ To create the testing object for a Nova Lens, add the test trait to your class,
```php
class TestClass extends TestCase
{
use \NovaUnit\Actions\NovaLensTest;
use NovaLensTest;

public function testNovaLens()
{
Expand Down Expand Up @@ -85,7 +85,7 @@ To create the testing object for a Nova Resource, add the test trait to your cla
```php
class TestClass extends TestCase
{
use \NovaUnit\Actions\NovaResourceTest;
use NovaResourceTest;

public function testNovaResource()
{
Expand Down

0 comments on commit 78c2c4a

Please sign in to comment.