Update traits for unit test

This commit is contained in:
printempw 2018-08-16 01:01:22 +08:00
parent 5051e8b2f8
commit 8aa3416260
6 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
trait GenerateFakePlugins trait GeneratesFakePlugins
{ {
/** /**
* Generate fake content of a plugin's package.json. * Generate fake content of a plugin's package.json.

View File

@ -11,7 +11,7 @@ use GuzzleHttp\Exception\RequestException;
* @see http://docs.guzzlephp.org/en/stable/testing.html * @see http://docs.guzzlephp.org/en/stable/testing.html
* @see https://christrombley.me/blog/testing-guzzle-6-responses-with-laravel * @see https://christrombley.me/blog/testing-guzzle-6-responses-with-laravel
*/ */
trait MockGuzzleClient trait MocksGuzzleClient
{ {
public $guzzleMockHandler; public $guzzleMockHandler;

View File

@ -6,7 +6,8 @@ use GuzzleHttp\Exception\RequestException;
class MarketControllerTest extends TestCase class MarketControllerTest extends TestCase
{ {
use GenerateFakePlugins; use MocksGuzzleClient;
use GeneratesFakePlugins;
protected function setUp() protected function setUp()
{ {

View File

@ -6,7 +6,7 @@ use Illuminate\Foundation\Testing\DatabaseTransactions;
class PluginControllerTest extends TestCase class PluginControllerTest extends TestCase
{ {
use GenerateFakePlugins; use GeneratesFakePlugins;
use DatabaseTransactions; use DatabaseTransactions;
protected function setUp() protected function setUp()

View File

@ -2,7 +2,6 @@
class TestCase extends Illuminate\Foundation\Testing\TestCase class TestCase extends Illuminate\Foundation\Testing\TestCase
{ {
use MockGuzzleClient;
use InteractsWithCache; use InteractsWithCache;
/** /**

View File

@ -10,6 +10,7 @@ use Illuminate\Foundation\Testing\DatabaseTransactions;
class UpdateControllerTest extends TestCase class UpdateControllerTest extends TestCase
{ {
use MocksGuzzleClient;
use DatabaseTransactions; use DatabaseTransactions;
protected function setUp() protected function setUp()