Skip to content
Permalink
Browse files

Simplify fixtures.

Remove datetime columns. These columns have caused
many random test failures in the past and are not useful for
ensuring that things like associations work correctly.
  • Loading branch information...
markstory committed Jun 14, 2013
1 parent 80a8d81 commit 5173f1651f595605a53d91db7db000bd3889a065
@@ -28,26 +28,17 @@
*/
class ArticleFixture extends TestFixture {
/**
* name property
*
* @var string 'Article'
*/
public $name = 'Article';
/**
* fields property
*
* @var array
*/
public $fields = array(
'id' => ['type' => 'integer'],
'user_id' => ['type' => 'integer', 'null' => true],
'author_id' => ['type' => 'integer', 'null' => true],
'title' => ['type' => 'string', 'null' => true],
'body' => 'text',
'published' => ['type' => 'string', 'length' => 1, 'default' => 'N'],
'created' => 'datetime',
'updated' => 'datetime',
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]
);
@@ -57,9 +48,9 @@ class ArticleFixture extends TestFixture {
* @var array
*/
public $records = array(
array('user_id' => 1, 'title' => 'First Article', 'body' => 'First Article Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'),
array('user_id' => 3, 'title' => 'Second Article', 'body' => 'Second Article Body', 'published' => 'Y', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31'),
array('user_id' => 1, 'title' => 'Third Article', 'body' => 'Third Article Body', 'published' => 'Y', 'created' => '2007-03-18 10:43:23', 'updated' => '2007-03-18 10:45:31')
array('author_id' => 1, 'title' => 'First Article', 'body' => 'First Article Body', 'published' => 'Y'),
array('author_id' => 3, 'title' => 'Second Article', 'body' => 'Second Article Body', 'published' => 'Y'),
array('author_id' => 1, 'title' => 'Third Article', 'body' => 'Third Article Body', 'published' => 'Y')
);
}
@@ -28,13 +28,6 @@
*/
class ArticlesTagFixture extends TestFixture {
/**
* name property
*
* @var string 'ArticlesTag'
*/
public $name = 'ArticlesTag';
/**
* fields property
*
@@ -28,24 +28,14 @@
*/
class AuthorFixture extends TestFixture {
/**
* name property
*
* @var string 'Author'
*/
public $name = 'Author';
/**
* fields property
*
* @var array
*/
public $fields = array(
'id' => ['type' => 'integer'],
'user' => ['type' => 'string', 'default' => null],
'password' => ['type' => 'string', 'default' => null],
'created' => 'datetime',
'updated' => 'datetime',
'name' => ['type' => 'string', 'default' => null],
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]
);
@@ -55,9 +45,9 @@ class AuthorFixture extends TestFixture {
* @var array
*/
public $records = array(
array('user' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31'),
array('user' => 'nate', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:18:23', 'updated' => '2007-03-17 01:20:31'),
array('user' => 'larry', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:20:23', 'updated' => '2007-03-17 01:22:31'),
array('user' => 'garrett', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:22:23', 'updated' => '2007-03-17 01:24:31'),
array('name' => 'mariano'),
array('name' => 'nate'),
array('name' => 'larry'),
array('name' => 'garrett'),
);
}
@@ -28,13 +28,6 @@
*/
class PostFixture extends TestFixture {
/**
* name property
*
* @var string 'Post'
*/
public $name = 'Post';
/**
* fields property
*
@@ -46,8 +39,6 @@ class PostFixture extends TestFixture {
'title' => ['type' => 'string', 'null' => false],
'body' => 'text',
'published' => ['type' => 'string', 'length' => 1, 'default' => 'N'],
'created' => 'datetime',
'updated' => 'datetime',
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]
);
@@ -57,8 +48,8 @@ class PostFixture extends TestFixture {
* @var array
*/
public $records = array(
array('author_id' => 1, 'title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'),
array('author_id' => 3, 'title' => 'Second Post', 'body' => 'Second Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31'),
array('author_id' => 1, 'title' => 'Third Post', 'body' => 'Third Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:43:23', 'updated' => '2007-03-18 10:45:31')
array('author_id' => 1, 'title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y'),
array('author_id' => 3, 'title' => 'Second Post', 'body' => 'Second Post Body', 'published' => 'Y'),
array('author_id' => 1, 'title' => 'Third Post', 'body' => 'Third Post Body', 'published' => 'Y')
);
}
@@ -28,21 +28,14 @@
*/
class TagFixture extends TestFixture {
/**
* name property
*
* @var string 'Tag'
*/
public $name = 'Tag';
/**
* fields property
*
* @var array
*/
public $fields = array(
'id' => ['type' => 'integer'],
'tag' => ['type' => 'string', 'null' => false],
'name' => ['type' => 'string', 'null' => false],
'created' => 'datetime',
'updated' => 'datetime',
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]
@@ -54,8 +47,8 @@ class TagFixture extends TestFixture {
* @var array
*/
public $records = array(
array('tag' => 'tag1', 'created' => '2007-03-18 12:22:23', 'updated' => '2007-03-18 12:24:31'),
array('tag' => 'tag2', 'created' => '2007-03-18 12:24:23', 'updated' => '2007-03-18 12:26:31'),
array('tag' => 'tag3', 'created' => '2007-03-18 12:26:23', 'updated' => '2007-03-18 12:28:31')
array('name' => 'tag1', 'created' => '2007-03-18 12:22:23', 'updated' => '2007-03-18 12:24:31'),
array('name' => 'tag2', 'created' => '2007-03-18 12:24:23', 'updated' => '2007-03-18 12:26:31'),
array('name' => 'tag3', 'created' => '2007-03-18 12:26:23', 'updated' => '2007-03-18 12:28:31')
);
}

0 comments on commit 5173f16

Please sign in to comment.
You can’t perform that action at this time.