Skip to content

Commit

Permalink
Update README.md and CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin committed Jan 11, 2018
1 parent 8cb4add commit c562204
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to `Spark Plug` will be documented in this file.

## [0.6.0](https://github.com/rougin/spark-plug/compare/v0.5.0...v0.6.0) - 2018-01-11
## [0.6.0](https://github.com/rougin/spark-plug/compare/v0.5.0...v0.6.0) - 2018-01-12

### Added
- `SparkPlug::instance` method (replaces `getCodeIgniter` method)
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Quality Score][ico-code-quality]][link-code-quality]
[![Total Downloads][ico-downloads]][link-downloads]

Returns [Codeigniter](https://codeigniter.com/) applications as single variables. Might be useful for testing frameworks such as [PHPUnit](https://phpunit.de/).
Spark Plug returns [Codeigniter](https://codeigniter.com/) applications as single variables. Might be useful for testing frameworks such as [PHPUnit](https://phpunit.de/).

## Install

Expand All @@ -24,7 +24,7 @@ $ composer require rougin/spark-plug
``` php
$ci = Rougin\SparkPlug\Instance::create();

// You can now use its instance
// You can now use the CI_Controller instance
$ci->load->helper('inflector');
```

Expand All @@ -37,7 +37,6 @@ $sparkplug = SparkPlug($GLOBALS, $_SERVER);

$ci = $sparkplug->instance();

// You can now use its instance
$ci->load->helper('inflector');
```

Expand All @@ -48,10 +47,9 @@ use Rougin\SparkPlug\SparkPlug;

$sparkplug = SparkPlug($GLOBALS, $_SERVER);

// Sets the value of the APPPATH constant
$sparkplug->set('APPPATH', '/path/to/app');
$sparkplug->set('VIEWPATH', '/path/to/app/views');

// \CI_Controller
$ci = $sparkplug->instance();
```

Expand All @@ -72,7 +70,7 @@ class SampleTest extends \PHPUnit_Framework_TestCase
{
public function testCodeigniterInstance()
{
// Path of your test application
// Directory path to the test application
$application = __DIR__ . '/TestApp';

// Instance::create($path, $_SERVER, $GLOBALS)
Expand All @@ -83,8 +81,6 @@ class SampleTest extends \PHPUnit_Framework_TestCase
}
```

**NOTE**: To create a mock instance, a [rougin/codeigniter](https://github.com/rougin/codeigniter) package and a test application directory are required. Kindly check the [tests](https://github.com/rougin/spark-plug/tree/master/tests) directory for more examples.

## Change log

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
Expand Down

0 comments on commit c562204

Please sign in to comment.