Fix coding standard issues with fixtures.

This commit is contained in:
mark_story 2012-03-17 23:31:17 -04:00
parent c54ac257f1
commit fab9547ac9
16 changed files with 28 additions and 22 deletions

View file

@ -30,6 +30,7 @@ class AccountFixture extends CakeTestFixture {
* @var string 'Aco'
*/
public $name = 'Account';
public $table = 'Accounts';
/**

View file

@ -30,6 +30,7 @@ class ContentAccountFixture extends CakeTestFixture {
* @var string 'Aco'
*/
public $name = 'ContentAccount';
public $table = 'ContentAccounts';
/**

View file

@ -30,6 +30,7 @@ class ContentFixture extends CakeTestFixture {
* @var string 'Aco'
*/
public $name = 'Content';
public $table = 'Content';
/**

View file

@ -40,7 +40,6 @@ class DataTestFixture extends CakeTestFixture {
'id' => array('type' => 'integer', 'key' => 'primary'),
'count' => array('type' => 'integer', 'default' => 0),
'float' => array('type' => 'float', 'default' => 0),
//'timestamp' => array('type' => 'timestamp', 'default' => null, 'null' => true),
'created' => array('type' => 'datetime', 'default' => null),
'updated' => array('type' => 'datetime', 'default' => null)
);

View file

@ -52,6 +52,7 @@ class FixturizedTestCase extends CakeTestCase {
* test that a fixtures are unoaded even if the test throws exceptions
*
* @return void
* @throws Exception
*/
public function testThrowException() {
throw new Exception();

View file

@ -23,15 +23,18 @@
* @package Cake.Test.Fixture
*/
class GroupUpdateAllFixture extends CakeTestFixture {
public $name = 'GroupUpdateAll';
public $table = 'group_update_all';
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'),
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'name' => array('type' => 'string', 'null' => false, 'length' => 29),
'code' => array('type' => 'integer', 'null' => false, 'length' => 4),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);
public $records = array(
array(
'id' => 1,

View file

@ -27,9 +27,11 @@
class PrefixTestFixture extends CakeTestFixture {
public $name = 'PrefixTest';
public $table = 'prefix_prefix_tests';
public $fields = array(
'id' => array('type' => 'integer', 'key' => 'primary'),
);
}

View file

@ -23,16 +23,19 @@
* @package Cake.Test.Fixture
*/
class ProductUpdateAllFixture extends CakeTestFixture {
public $name = 'ProductUpdateAll';
public $table = 'product_update_all';
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'),
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'name' => array('type' => 'string', 'null' => false, 'length' => 29),
'groupcode' => array('type' => 'integer', 'null' => false, 'length' => 4),
'group_id' => array('type' => 'integer', 'null' => false, 'length' => 8),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);
public $records = array(
array(
'id' => 1,

View file

@ -31,13 +31,6 @@ class SessionFixture extends CakeTestFixture {
*/
public $name = 'Session';
/**
* table property.
*
* @var string
*/
// public $table = 'sessions';
/**
* fields property
*

View file

@ -1,5 +1,4 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
@ -28,6 +27,7 @@
* @package Cake.Test.Fixture
*/
class TranslateWithPrefixFixture extends CakeTestFixture {
/**
* name property
*

View file

@ -30,6 +30,7 @@ class UnderscoreFieldFixture extends CakeTestFixture {
* @var string 'UnderscoreField'
*/
public $name = 'UnderscoreField';
/**
* fields property
*
@ -43,6 +44,7 @@ class UnderscoreFieldFixture extends CakeTestFixture {
'published' => array('type' => 'string', 'length' => 1, 'default' => 'N'),
'another_field' => array('type' => 'integer', 'length' => 3),
);
/**
* records property
*