Categories
development

Cryptic MySQL Error on DROP TABLE

Ran across this fairly unhelpful error in MySQL today: InnoDB: Error: in ALTER TABLE `myschema`.`mytablename` has or is referenced in foreign key constraints which are not compatible with the new table definition. [Warning]: Invalid (old?) table or database name ‘#sql-a5c_8’ InnoDB: Error: table `myschema`.`mytablename` does not exist in the InnoDB internal data dictionary though MySQL is trying to drop […]

Categories
websites

Codeception with Yii Part 1 – Acceptance Tests

I will be working with a default, standard, bare Yii webapp generated from the command line – called yiicodecept. > yiic webapp yiicodecept !Important! For starters, delete the protected/tests directory – Codeception will create what it needs in there. We generally follow Codeception install instructions here: http://codeception.com/quickstart Summary: Save .phar to root/protected of webapp (yiicodecept/protected) […]

Categories
websites

Setting up Yii Testing with XAMPP, PHPUnit and Selenium

Setup Yii Testing In protected/tests/WebTestCase.php, change TEST_BASE_URL to your project define(‘TEST_BASE_URL’,’http://127.0.0.1/webapp/’); Check protected/tests/bootstrap.php to make sure it is configured in a reasonable manner.  I believe in most cases it will be fine – I am using the yii-environment extension, and needed to copy over my config so it would read from existing config files.  Take […]