Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100% coverage for entity/table tests #16

Merged
merged 1 commit into from
Sep 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ composer.lock
./vendor/*
./build/
/vendor/
*.phar
4 changes: 2 additions & 2 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => '0.0.0.0',
'host' => 'localhost',
//'port' => 'nonstandard_port_number',
'username' => 'mllAdmin',
'password' => false,
'password' => 'toto',
'database' => 'mll_site',
'encoding' => 'utf8',
'timezone' => 'UTC',
Expand Down
32 changes: 32 additions & 0 deletions tests/TestCase/Model/Table/CommentsTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
namespace App\Test\TestCase\Model\Table;

use App\Model\Table\CommentsTable;
use Cake\ORM\RulesChecker;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Validation\Validator;

/**
* Tests for CommentsTable
Expand Down Expand Up @@ -143,4 +145,34 @@ public function testSetText()

$this->assertEquals($expected, $result);
}

/**
* Test validation
* @return void
*/
public function testValidation()
{
$validator = new Validator();

$expected = $validator;

$result = $this->Comments->validationDefault($validator);

$this->assertEquals($expected, $result);
}

/**
* Test buildRules
* @return void
*/
public function testBuildRules()
{
$rule = new RulesChecker();

$expected = $rule;

$result = $this->Comments->buildRules($rule);

$this->assertEquals($expected, $result);
}
}
32 changes: 32 additions & 0 deletions tests/TestCase/Model/Table/MissionsTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
namespace App\Test\TestCase\Model\Table;

use App\Model\Table\MissionsTable;
use Cake\ORM\RulesChecker;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Validation\Validator;

/**
* Tests for CommentsTable
Expand Down Expand Up @@ -190,4 +192,34 @@ public function testSetActive()

$this->assertEquals($expected, $result);
}

/**
* Test validation
* @return void
*/
public function testValidation()
{
$validator = new Validator();

$expected = $validator;

$result = $this->Missions->validationDefault($validator);

$this->assertEquals($validator, $result);
}

/**
* Test buildRules
* @return void
*/
public function testBuildRules()
{
$rule = new RulesChecker();

$expected = $rule;

$result = $this->Missions->buildRules($rule);

$this->assertEquals($expected, $result);
}
}
32 changes: 32 additions & 0 deletions tests/TestCase/Model/Table/OrganizationsProjectsTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
namespace App\Test\TestCase\Model\Table;

use App\Model\Table\OrganizationsProjectsTable;
use Cake\ORM\RulesChecker;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Validation\Validator;

/**
* Tests for OrganizationsProjectsTable
Expand Down Expand Up @@ -108,4 +110,34 @@ public function testGetOrganization()

$this->assertEquals($expected, $result);
}

/**
* Test validation
* @return void
*/
public function testValidation()
{
$validator = new Validator();

$expected = $validator;

$result = $this->OrganizationsProjects->validationDefault($validator);

$this->assertEquals($validator, $result);
}

/**
* Test buildRules
* @return void
*/
public function testBuildRules()
{
$rule = new RulesChecker();

$expected = $rule;

$result = $this->OrganizationsProjects->buildRules($rule);

$this->assertEquals($expected, $result);
}
}
16 changes: 16 additions & 0 deletions tests/TestCase/Model/Table/OrganizationsTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use App\Model\Table\OrganizationsTable;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Validation\Validator;

/**
* Tests for OrganizationsTable
Expand Down Expand Up @@ -193,4 +194,19 @@ public function testSetDescription()

$this->assertEquals($expected, $result);
}

/**
* Test validation
* @return void
*/
public function testValidation()
{
$validator = new Validator();

$expected = $validator;

$result = $this->Organizations->validationDefault($validator);

$this->assertEquals($validator, $result);
}
}
32 changes: 32 additions & 0 deletions tests/TestCase/Model/Table/ProjectsTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
namespace App\Test\TestCase\Model\Table;

use App\Model\Table\ProjectsTable;
use Cake\ORM\RulesChecker;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Validation\Validator;

/**
* Tests for ProjectsTable
Expand Down Expand Up @@ -243,4 +245,34 @@ public function testSetArchived()

$this->assertEquals($expected, $result);
}

/**
* Test validation
* @return void
*/
public function testValidation()
{
$validator = new Validator();

$expected = $validator;

$result = $this->Projects->validationDefault($validator);

$this->assertEquals($validator, $result);
}

/**
* Test buildRules
* @return void
*/
public function testBuildRules()
{
$rule = new RulesChecker();

$expected = $rule;

$result = $this->Projects->buildRules($rule);

$this->assertEquals($expected, $result);
}
}
32 changes: 32 additions & 0 deletions tests/TestCase/Model/Table/ProjectsUsersMissionsTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
namespace App\Test\TestCase\Model\Table;

use App\Model\Table\ProjectsUsersMissionsTable;
use Cake\ORM\RulesChecker;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Validation\Validator;

/**
* Tests for ProjectsUsersMissionsTable
Expand Down Expand Up @@ -115,4 +117,34 @@ public function testGetMissionId()

$this->assertEquals($expected, $result);
}

/**
* Test validation
* @return void
*/
public function testValidation()
{
$validator = new Validator();

$expected = $validator;

$result = $this->ProjectsUsersMissions->validationDefault($validator);

$this->assertEquals($validator, $result);
}

/**
* Test buildRules
* @return void
*/
public function testBuildRules()
{
$rule = new RulesChecker();

$expected = $rule;

$result = $this->ProjectsUsersMissions->buildRules($rule);

$this->assertEquals($expected, $result);
}
}
33 changes: 33 additions & 0 deletions tests/TestCase/Model/Table/ProjectsUsersTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
namespace App\Test\TestCase\Model\Table;

use App\Model\Table\ProjectsUsersTable;
use Cake\ORM\RulesChecker;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Validation\Validator;

/**
* Tests for ProjectsUsersTable
Expand Down Expand Up @@ -275,4 +277,35 @@ public function testSetMentor()

$this->assertEquals($expected, $result);
}

/**
* Test validation
* @return void
*/
public function testValidation()
{
$validator = new Validator();

$expected = $validator;

$result = $this->ProjectsUsers->validationDefault($validator);

$this->assertEquals($validator, $result);
}

/**
* Test buildRules
* @return void
*/
public function testBuildRules()
{
$rule = new RulesChecker();

$expected = $rule;

$result = $this->ProjectsUsers->buildRules($rule);

$this->assertEquals($expected, $result);
}
}

32 changes: 32 additions & 0 deletions tests/TestCase/Model/Table/SvnUsersTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
namespace App\Test\TestCase\Model\Table;

use App\Model\Table\SvnUsersTable;
use Cake\ORM\RulesChecker;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Validation\Validator;

/**
* Tests for SvnUsersTable
Expand Down Expand Up @@ -138,4 +140,34 @@ public function testGetUserId()

$this->assertEquals($expected, $result);
}

/**
* Test validation
* @return void
*/
public function testValidation()
{
$validator = new Validator();

$expected = $validator;

$result = $this->SvnUsers->validationDefault($validator);

$this->assertEquals($validator, $result);
}

/**
* Test buildRules
* @return void
*/
public function testBuildRules()
{
$rule = new RulesChecker();

$expected = $rule;

$result = $this->SvnUsers->buildRules($rule);

$this->assertEquals($expected, $result);
}
}
16 changes: 16 additions & 0 deletions tests/TestCase/Model/Table/SvnsTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use App\Model\Table\SvnsTable;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Validation\Validator;

/**
* Tests for SvnsTable
Expand Down Expand Up @@ -117,4 +118,19 @@ public function testSetName()

$this->assertEquals($expected, $result);
}

/**
* Test validation
* @return void
*/
public function testValidation()
{
$validator = new Validator();

$expected = $validator;

$result = $this->Svns->validationDefault($validator);

$this->assertEquals($validator, $result);
}
}
Loading