timglabisch / pimunit

Phpunit for Pimcore
1 stars 0 forks source link

Table 'pimunit_projectname_pimcore_xxxxx_test.objects' doesn't exist #4

Open rafaame opened 11 years ago

rafaame commented 11 years ago

Hello,

I'm using Pimunit to test my Pimcore project, but sometimes I get all the assertions wrong and a MySQL error. I think it's a Pimunit's issue, could you verify?

Here is a test class I'm using: http://pastebin.com/xkLR2ZPk

Here's the PHPUnit output: http://pastebin.com/0fGc6vMV

Note: it just happens with tests using fixtures (yaml)

timglabisch commented 11 years ago

thanks for reporting,

i've a few questions;

  1. how often is "sometimes"?
  2. can you say me the pimunit revision and the pimcore version or revision?
  3. do you call getDb, getConnection, ... to get a pimcore mysql resource? May to setup Sessions?
  4. Can you say me something about your environment? Php / Mysql Version? operating system?
  5. does the pimunit testsuite sometimes fail, too?
rafaame commented 11 years ago

1 - I mean yesterday it was working and today it isn't anymore. The problem is that I didn't change anything in the testing code. I simply ran the tests today and it wasn't working anymore.

2- pimcore version 1.4.9 and latest pimunit revision

3- No, I don't call these in my code.

4- php 5.4, mysql 5.5, I'll give you the full version number when I get home.

5- It's not sometimes, sorry. What I meant is that it suddenly stopped working.

I can zip the entire project and send you if it helps, it's in the beginning so is relatively small.

timglabisch commented 11 years ago

the latest supportet pimcore version is 1.4.8, elements changed a lot about bootstrapping in 1.4.9. i am going to migrate pimunit, i hope around next weekend to 1.4.9. if this doesnt help i woul love to get your source.

viziens commented 11 years ago

I had the same problem and I resolved by switching to MySQLi. Basically what happened is, that getConnection() returned null and queries to create objects table weren't executed.