PHP Class Cviebrock\EloquentTaggable\Test\TestCase

Inheritance: extends Orchestra\Testbench\TestCase
显示文件 Open project: cviebrock/eloquent-taggable Class Usage Examples

Protected Properties

Property Type Description
$testData array
$testModel TestModel

Public Methods

Method Description
setUp ( ) : void Setup the test environment.

Protected Methods

Method Description
assertArrayValuesAreEqual ( array $expected, array $actual ) Custom test to see if two arrays have the same values, regardless of indices or order.
getEnvironmentSetUp ( Illuminate\Foundation\Application $app ) : void Define environment setup.
getPackageProviders ( Illuminate\Foundation\Application $app ) : array Get package providers.
newModel ( array $data = ['title' => 'test'] ) : TestModel Helper to generate a test model
setUpDatabase ( Illuminate\Foundation\Application $app )

Method Details

assertArrayValuesAreEqual() protected method

Custom test to see if two arrays have the same values, regardless of indices or order.
protected assertArrayValuesAreEqual ( array $expected, array $actual )
$expected array
$actual array

getEnvironmentSetUp() protected method

Define environment setup.
protected getEnvironmentSetUp ( Illuminate\Foundation\Application $app ) : void
$app Illuminate\Foundation\Application
return void

getPackageProviders() protected method

Get package providers.
protected getPackageProviders ( Illuminate\Foundation\Application $app ) : array
$app Illuminate\Foundation\Application
return array

newModel() protected method

Helper to generate a test model
protected newModel ( array $data = ['title' => 'test'] ) : TestModel
$data array
return TestModel

setUp() public method

Setup the test environment.
public setUp ( ) : void
return void

setUpDatabase() protected method

protected setUpDatabase ( Illuminate\Foundation\Application $app )
$app Illuminate\Foundation\Application

Property Details

$testData protected_oe property

protected array $testData
return array

$testModel protected_oe property

protected TestModel,Cviebrock\EloquentTaggable\Test $testModel
return TestModel