0

When I am running test cases I am getting the above error: "Fixture invalid: Count of fields does not match count of values".

Can anyone say why I would be getting that? And how to fix it?

I must note that for my fixtures, I am automatically importing the table definition like so:

/**
 * Import table definition
 *
 * @var string
 */
    public $import = 'Category';

/**
 * Records
 *
 * @var array
 */
    public $records = array(
        array(
            'id' => 1,
            'name' => 'Science',
            'post_count' => 0
        ),
        array(
            'id' => 2,
            'name' => 'Information Technology',
            'post_count' => 0
        ),
        array(
            'id' => 3,
            'name' => 'Philosophy',
            'post_count' => 0
        )
    );

I am using CakePHP 2.5, xampp.

antoniovassell
  • 1,012
  • 14
  • 24

1 Answers1

1

Ah, the error was explicit. I was importing the table definition for the model automatically, but had the wrong list of fields in the records section.

antoniovassell
  • 1,012
  • 14
  • 24