UP Statistik
This commit is contained in:
51
tests/Fixture/EmploymentsFixture.php
Normal file
51
tests/Fixture/EmploymentsFixture.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
namespace App\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* EmploymentsFixture
|
||||
*
|
||||
*/
|
||||
class EmploymentsFixture extends TestFixture
|
||||
{
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// @codingStandardsIgnoreStart
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
|
||||
'name' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null, 'fixed' => null],
|
||||
'created' => ['type' => 'datetime', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
|
||||
'modified' => ['type' => 'datetime', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
|
||||
'_constraints' => [
|
||||
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
|
||||
],
|
||||
'_options' => [
|
||||
'engine' => 'InnoDB',
|
||||
'collation' => 'utf8_general_ci'
|
||||
],
|
||||
];
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
/**
|
||||
* Init method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->records = [
|
||||
[
|
||||
'id' => 1,
|
||||
'name' => 'Lorem ipsum dolor sit amet',
|
||||
'created' => '2019-02-21 07:03:25',
|
||||
'modified' => '2019-02-21 07:03:25'
|
||||
],
|
||||
];
|
||||
parent::init();
|
||||
}
|
||||
}
|
||||
63
tests/TestCase/Model/Table/EmploymentsTableTest.php
Normal file
63
tests/TestCase/Model/Table/EmploymentsTableTest.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
namespace App\Test\TestCase\Model\Table;
|
||||
|
||||
use App\Model\Table\EmploymentsTable;
|
||||
use Cake\ORM\TableRegistry;
|
||||
use Cake\TestSuite\TestCase;
|
||||
|
||||
/**
|
||||
* App\Model\Table\EmploymentsTable Test Case
|
||||
*/
|
||||
class EmploymentsTableTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Test subject
|
||||
*
|
||||
* @var \App\Model\Table\EmploymentsTable
|
||||
*/
|
||||
public $Employments;
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = [
|
||||
'app.employments'
|
||||
];
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$config = TableRegistry::getTableLocator()->exists('Employments') ? [] : ['className' => EmploymentsTable::class];
|
||||
$this->Employments = TableRegistry::getTableLocator()->get('Employments', $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
unset($this->Employments);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test initialize method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testInitialize()
|
||||
{
|
||||
$this->markTestIncomplete('Not implemented yet.');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user