lp:~lewiszhang/coughphp/1.4-switch-to-phpunit
- Get this branch:
- bzr branch lp:~lewiszhang/coughphp/1.4-switch-to-phpunit
Branch merges
- Anthony Bush: Pending requested
-
Diff: 1367 lines (+282/-337)13 files modifiedscripts/test_all (+0/-18)
scripts/utest (+0/-79)
tests/autoloader/AutoloaderCacheFileTest.class.php (+23/-0)
tests/autoloader/AutoloaderTest.class.php (+14/-28)
tests/cough/CoughCollectionTest.class.php (+34/-35)
tests/cough/CoughDatabaseFactoryTest.class.php (+30/-28)
tests/cough/CoughInstancePoolTest.class.php (+9/-10)
tests/cough/CoughObjectTest.class.php (+80/-82)
tests/cough_generator/CoughGeneratorTest.class.php (+10/-11)
tests/dal/CoughAsDatabaseTest.class.php (+43/-44)
tests/database_config.inc.php (+8/-2)
tests/phpunit-after.xml (+8/-0)
tests/phpunit.xml (+23/-0)
Related bugs
Related blueprints
Branch information
Recent revisions
- 309. By Lewis Zhang
-
Convert from SimpleTest to PHPUnit. To run the tests:
$ cd tests/
$ phpunit --verboseIf you would like to test Autoloader's register_
shutdown_ function hook: $ phpunit --verbose --configuration phpunit-after.xml
Tested on PHPUnit version 3.5.5 installed via PEAR.
- 307. By Anthony Bush
-
- Added factory-level observers so that database connections aren't required to observe.
- Added getHostAndPort() accessor for observers. - 306. By Anthony Bush
-
As_Database improvements:
- Added nested DB transaction support.
- Added num rows accessor and corresponding observer gathering.
- Improved query logger's backtrace with version using less memory.
- Fixed freeResult() warnings by no longer constructing result objects from INSERT/UPDATE/etc. queries.
- Fixed some phpDoc switcheroos. - 304. By Anthony Bush
-
- CoughCollection:
- Calling save() on a collection now returns true if all elements saved successfully.
- Changed getLast() to return null when there are no items in the collection.
- get() now behaves like remove() (works with objects).
- add() now behaves like remove() (returns added object).
- Improved robustness of removeByKey() (when null key is given).
- Improved algorithm for issuing temporary keys: adding a new object twice now adds it to the collection only once.
- CoughObject:
- Improved toggling of isNew.
- Improved save(): chains such as collection saving and reseting modified fields are only executed if save was successful.
- Fixed issue when cloning objects that make use of comparing modified fields to their original values.
- setModifiedField() now saves the original value for later retrieval; it did this before, but multiple calls to set*() would override the *true* original value.
- Added getOldFieldValue($fieldName) : use for retriving original value for a field (use when writing app-based save() triggers).
- Added isFieldDifferent($fieldName) : shortcut for finding out if a field wasn't just modified, but was modified to a different value (use when writing app-based save() triggers).
- CoughDatabaseFactory:
- Added saveToMemento() and restoreFromMemento(). - 300. By Anthony Bush
-
Updated schema generator so that other drivers may be used (was hard-coded to use mysql).
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)