Skip to content

Commit 5700e60

Browse files
committed
Update CHANGELOG + Deprecated ControllerTestCase
1 parent 9a7697b commit 5700e60

2 files changed

Lines changed: 14 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88
## [v4.2.2]
99

1010
### Added
11-
- Added Group factory (`'UserFrosting\Sprinkle\Account\Database\Models\Group'`)
11+
- Group factory (`'UserFrosting\Sprinkle\Account\Database\Models\Group'`)
12+
- `withController` Trait, as an alternative for `ControllerTestCase`
13+
- StyleCI config
14+
- [Travis] SQLite in-memory DB testing
15+
- [Travis] memcache & Redis service
1216

1317
### Fixed
1418
- Make group & role schema consistent between creation and edition. Prevents group and role without a name or slug to be created during edition.
15-
- Permission factory now declares slug as unique
19+
- Factories changed to make sure slugs are unique
1620

1721
### Changed
1822
- Recommended PHP version is now 7.2, as 7.1 will be EOL in less than 6 months
23+
- Improved controllers test coverage & tests efficiency
24+
- Applied styling rules from StyleCI & updated php-cs-fixer rules to match StyleCI config
25+
26+
### Deprecated
27+
- `ControllerTestCase`. Use `withController` Trait instead.
28+
1929

2030
## [v4.2.1]
2131

app/sprinkles/core/tests/ControllerTestCase.php

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,20 @@
1010

1111
namespace UserFrosting\Sprinkle\Core\Tests;
1212

13-
use Slim\Http\Environment;
14-
use Slim\Http\Request;
15-
use Slim\Http\Response;
1613
use UserFrosting\Tests\TestCase;
1714

1815
/**
1916
* Special TestCase for Controller Tests
2017
*
2118
* @see https://akrabat.com/testing-slim-framework-actions/
2219
* @author Louis Charette
20+
* @deprecated Use `withController` Trait instead
2321
*/
2422
class ControllerTestCase extends TestCase
2523
{
2624
use TestDatabase;
2725
use RefreshDatabase;
26+
use withController;
2827

2928
/**
3029
* Setup test database for controller tests
@@ -35,23 +34,4 @@ public function setUp()
3534
$this->setupTestDatabase();
3635
$this->refreshDatabase();
3736
}
38-
39-
/**
40-
* @param array $args Request arguments
41-
* @return Request
42-
*/
43-
protected function getRequest(array $args = [])
44-
{
45-
$env = Environment::mock($args);
46-
47-
return Request::createFromEnvironment($env);
48-
}
49-
50-
/**
51-
* @return Response
52-
*/
53-
protected function getResponse()
54-
{
55-
return new Response();
56-
}
5737
}

0 commit comments

Comments
 (0)