18 Commits

Author SHA1 Message Date
f5d0bcbcfc Refactored cache key generation. 2013-05-26 17:09:09 -04:00
7cd9123c3b Tests cleanup
- Better names
- Removed not used MySQLTestCase
- Moved base testcase for DB to db namespace
- Minor style fixes
2013-05-24 18:35:00 +04:00
a021fbe54d Skipped ApcCacheTest expire 2013-05-12 18:24:01 +04:00
48f388442f mocking time in test only usefull when using time() once
e2513de6c6 (commitcomment-3192244)
2013-05-11 16:09:40 +02:00
e2513de6c6 better testing: time()-function-mock
as discussed in #203
https://github.com/yiisoft/yii2/issues/203#issuecomment-17759631
2013-05-11 15:41:00 +02:00
71a9efdd55 changed cache test to wait more than expirytime
change is to avoid random test failure on race condition.
fixes #203 #231
2013-05-11 13:33:05 +02:00
6a7529505e cache tests refactoring cherry picked from redis branch 2013-05-11 13:16:47 +02:00
e0ad712527 Merge pull request #204 branch 'unittest-app-dependency' of https://github.com/bwoester/yii2 into bwoester-unittest-app-dependency
* 'unittest-app-dependency' of https://github.com/bwoester/yii2:
  mod: incorporate suggestions - rename requireApp() to mockApplication() - always destroy app on tearDown()   - eliminates need for constant YII_DESTROY_APP_ON_TEARDOWN   - mockApplication() becomes a lot easier. Destroying app on each tearDown     means creating it on every call is fine. No more checking if it already     exists and if it has been created from the same config. - \yii::$app should have been \Yii::$app
  add: new key for unit tests config named "className". Allows to run the tests      using different Application instances (consoleApp/ webApp) mod: TestCase::getParam accepts second param $default=null
  mod: don't create app in bootstrap script, unit tests do it themselves add: option to destroy app after each test to find unit tests that fail      to require an app
  allow unit tests to requireApp() on setUp()

Conflicts:
	tests/unit/data/config.php
2013-05-11 12:22:49 +02:00
5575f53657 CS fixes. 2013-05-11 15:38:07 +06:00
f23a677bdf mod: incorporate suggestions
- rename requireApp() to mockApplication()
- always destroy app on tearDown()
  - eliminates need for constant YII_DESTROY_APP_ON_TEARDOWN
  - mockApplication() becomes a lot easier. Destroying app on each tearDown
    means creating it on every call is fine. No more checking if it already
    exists and if it has been created from the same config.
- \yii::$app should have been \Yii::$app
2013-05-10 02:01:08 +02:00
d4b30e26c2 allow unit tests to requireApp() on setUp() 2013-05-09 20:41:57 +02:00
d712605a71 Added and resolved Sqlite tests #15. 2013-05-09 23:12:18 +06:00
ca9194a365 Code style fixes 2013-05-07 20:17:35 +04:00
4be9e195c2 Add Newlines
Appended newlines to every PHP document that did not have a newline as the last character in the file.
2013-05-05 17:04:55 +01:00
802c0c94a8 Check apc.enable_cli for ApcTestCase unit tests 2013-05-05 19:18:04 +04:00
09dbaeb700 more assertions for cache test 2013-04-23 15:00:41 +04:00
4d59587320 fixed constructor overriding in test classes
now use setUp() instead
2013-03-29 01:10:03 +01:00
64fb2a815c added tests for cache 2013-02-07 23:48:55 +04:00