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

@ -86,7 +86,7 @@ class AssertTagsTestCase extends CakeTestCase {
$this->assertTags($input, $pattern);
}
/**
/**
* testBadAssertTags
*
* @return void

View file

@ -39,7 +39,7 @@ class BookFixture extends CakeTestFixture {
public $fields = array(
'id' => array('type' => 'integer', 'key' => 'primary'),
'isbn' => array('type' => 'string', 'length' => 13),
'title' => array('type' => 'string', 'length' => 255),
'title' => array('type' => 'string', 'length' => 255),
'author' => array('type' => 'string', 'length' => 255),
'year' => array('type' => 'integer', 'null' => true),
'pages' => array('type' => 'integer', 'null' => true)

View file

@ -38,7 +38,7 @@ class CdFixture extends CakeTestFixture {
*/
public $fields = array(
'id' => array('type' => 'integer', 'key' => 'primary'),
'title' => array('type' => 'string', 'length' => 255),
'title' => array('type' => 'string', 'length' => 255),
'artist' => array('type' => 'string', 'length' => 255, 'null' => true),
'genre' => array('type' => 'string', 'length' => 255, 'null' => true)
);

View file

@ -30,6 +30,7 @@ class ContentAccountFixture extends CakeTestFixture {
* @var string 'Aco'
*/
public $name = 'ContentAccount';
public $table = 'ContentAccounts';
/**
@ -39,8 +40,8 @@ class ContentAccountFixture extends CakeTestFixture {
*/
public $fields = array(
'iContentAccountsId' => array('type' => 'integer', 'key' => 'primary'),
'iContentId' => array('type' => 'integer'),
'iAccountId' => array('type' => 'integer')
'iContentId' => array('type' => 'integer'),
'iAccountId' => array('type' => 'integer')
);
/**

View file

@ -30,6 +30,7 @@ class ContentFixture extends CakeTestFixture {
* @var string 'Aco'
*/
public $name = 'Content';
public $table = 'Content';
/**
@ -38,8 +39,8 @@ class ContentFixture extends CakeTestFixture {
* @var array
*/
public $fields = array(
'iContentId' => array('type' => 'integer', 'key' => 'primary'),
'cDescription' => array('type' => 'string', 'length' => 50, 'null' => true)
'iContentId' => array('type' => 'integer', 'key' => 'primary'),
'cDescription' => array('type' => 'string', 'length' => 50, 'null' => true)
);
/**

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

@ -40,7 +40,7 @@ class FruitFixture extends CakeTestFixture {
'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'),
'name' => array('type' => 'string', 'length' => 255),
'color' => array('type' => 'string', 'length' => 13),
'shape' => array('type' => 'string', 'length' => 255),
'shape' => array('type' => 'string', 'length' => 255),
'taste' => array('type' => 'string', 'length' => 255)
);

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

View file

@ -40,7 +40,7 @@ class UuidTagFixture extends CakeTestFixture {
'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'),
'name' => array('type' => 'string', 'length' => 255),
'created' => array('type' => 'datetime')
);
);
/**
* records property