Skip to content

Commit

Permalink
Fix coding standard issues with fixtures.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 18, 2012
1 parent c54ac25 commit fab9547
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 22 deletions.
1 change: 1 addition & 0 deletions lib/Cake/Test/Fixture/AccountFixture.php
Expand Up @@ -30,6 +30,7 @@ class AccountFixture extends CakeTestFixture {
* @var string 'Aco'
*/
public $name = 'Account';

public $table = 'Accounts';

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Fixture/AssertTagsTestCase.php
Expand Up @@ -86,7 +86,7 @@ public function testNumericValuesInExpectationForAssertTags() {
$this->assertTags($input, $pattern);
}

/**
/**
* testBadAssertTags
*
* @return void
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Fixture/BookFixture.php
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Fixture/CdFixture.php
Expand Up @@ -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)
);
Expand Down
5 changes: 3 additions & 2 deletions lib/Cake/Test/Fixture/ContentAccountFixture.php
Expand Up @@ -30,6 +30,7 @@ class ContentAccountFixture extends CakeTestFixture {
* @var string 'Aco'
*/
public $name = 'ContentAccount';

public $table = 'ContentAccounts';

/**
Expand All @@ -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')
);

/**
Expand Down
5 changes: 3 additions & 2 deletions lib/Cake/Test/Fixture/ContentFixture.php
Expand Up @@ -30,6 +30,7 @@ class ContentFixture extends CakeTestFixture {
* @var string 'Aco'
*/
public $name = 'Content';

public $table = 'Content';

/**
Expand All @@ -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)
);

/**
Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Test/Fixture/DataTestFixture.php
Expand Up @@ -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)
);
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Test/Fixture/FixturizedTestCase.php
Expand Up @@ -52,6 +52,7 @@ public function testSkipIfFalse() {
* test that a fixtures are unoaded even if the test throws exceptions
*
* @return void
* @throws Exception
*/
public function testThrowException() {
throw new Exception();
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Fixture/FruitFixture.php
Expand Up @@ -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)
);

Expand Down
5 changes: 4 additions & 1 deletion lib/Cake/Test/Fixture/GroupUpdateAllFixture.php
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions lib/Cake/Test/Fixture/PrefixTestFixture.php
Expand Up @@ -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'),
);

}
5 changes: 4 additions & 1 deletion lib/Cake/Test/Fixture/ProductUpdateAllFixture.php
Expand Up @@ -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,
Expand Down
7 changes: 0 additions & 7 deletions lib/Cake/Test/Fixture/SessionFixture.php
Expand Up @@ -31,13 +31,6 @@ class SessionFixture extends CakeTestFixture {
*/
public $name = 'Session';

/**
* table property.
*
* @var string
*/
// public $table = 'sessions';

/**
* fields property
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php
@@ -1,5 +1,4 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
Expand Down Expand Up @@ -28,6 +27,7 @@
* @package Cake.Test.Fixture
*/
class TranslateWithPrefixFixture extends CakeTestFixture {

/**
* name property
*
Expand Down
6 changes: 4 additions & 2 deletions lib/Cake/Test/Fixture/UnderscoreFieldFixture.php
Expand Up @@ -30,7 +30,8 @@ class UnderscoreFieldFixture extends CakeTestFixture {
* @var string 'UnderscoreField'
*/
public $name = 'UnderscoreField';
/**

/**
* fields property
*
* @var array
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Fixture/UuidTagFixture.php
Expand Up @@ -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
Expand Down

0 comments on commit fab9547

Please sign in to comment.