Yii Framework Forum: [SOLVED] {{issue}} cannot be found - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[SOLVED] {{issue}} cannot be found help

#1 User is offline   sasori 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 297
  • Joined: 05-November 10

Posted 19 November 2010 - 05:38 AM

hi,,

why am i getting this error ?

Posted Image

it says, Issue cannot be found in the database, but tbl_issue does exists,
and also, I did indicated in the main.php file the tablePrefix => 'tbl_'
and when I created the Issue model, I indicated the 'tbl' prefix also in the gii UI,
why is this happening?

I followed the snippet on the book

IssueTest.php
<?php
class IssueTest extends CDbTestCase
{
    public function testGetTypes()
    {
        $options = Issue::model()->typeOptions;
        $this->assertTrue(is_array($options));
    }
}



Issue.php

    
    public function getTypeOptions()
    {
        return array();
    }


it should have passed the initial unit test right ?
0

#2 User is offline   sasori 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 297
  • Joined: 05-November 10

Posted 19 November 2010 - 06:04 AM

problem solved..

the reason why it failed and was looking for the issue is because,
the test db should have the exact tables that the development db has.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users