Comments (3)
I wrote this test that catches the problem:
public function testClassTableCreateSpecialCase() {
$initial_count = $this->Asset->find('count');
$this->Image->create(array(
'title' => 'BSD logo'));
$result = $this->Image->save();
$final_count = $this->Asset->find('count');
$this->assertTrue(!empty($result));
$this->assertEqual($final_count-$initial_count, 1);
}
This test fails because of the second condition. On the development version of cake, the test will fail because of the first condition.
from utils.
On 2.3.3 your test passes but another one is failing
Welcome to CakePHP v2.2.3 Console
App : plugins-2.0
Path: C:\xampp\htdocs\plugins-2.0\
CakePHP Test Shell
PHPUnit 3.6.10 by Sebastian Bergmann.
.......←[41;37mF←[0m....
Time: 1 second, Memory: 12.75Mb
There was 1 failure:
- InheritableTest::testClassInheritanceDelete
false does not match expected type "array".
C:\xampp\php\cakephp\lib\Cake\TestSuite\CakeTestCase.php:534
C:\xampp\htdocs\plugins-2.0\Plugin\Utils\Test\Case\Model\Behavior\InheritableTest.php:284
C:\xampp\php\cakephp\lib\Cake\TestSuite\CakeTestCase.php:78
C:\xampp\php\cakephp\lib\Cake\TestSuite\CakeTestRunner.php:57
C:\xampp\php\cakephp\lib\Cake\TestSuite\CakeTestSuiteCommand.php:111
C:\xampp\php\cakephp\lib\Cake\Console\Command\TestShell.php:274
C:\xampp\php\cakephp\lib\Cake\Console\Command\TestShell.php:259
C:\xampp\php\cakephp\lib\Cake\Console\Shell.php:393
C:\xampp\php\cakephp\lib\Cake\Console\ShellDispatcher.php:201
C:\xampp\php\cakephp\lib\Cake\Console\ShellDispatcher.php:69
C:\xampp\php\cakephp\lib\Cake\Console\cake.php:43
←[37;41m←[2KFAILURES!
←[0m←[37;41m←[2KTests: 12, Assertions: 44, Failures: 1.
←[0m←[2K
On 2.3 all tests pass
Welcome to CakePHP v2.3.0 Console
App : plugins-2.0
Path: C:\xampp\htdocs\plugins-2.0\
CakePHP Test Shell
PHPUnit 3.6.10 by Sebastian Bergmann.
............
Time: 1 second, Memory: 13.25Mb
←[30;42m←[2KOK (12 tests, 46 assertions)
←[0m←[2K
from utils.
Closing this one, please reopen if needed or send a PR with the unit test added. Thank you
from utils.
Related Issues (20)
- SoftDeleteBehavior : Model::deleteAll() HOT 4
- SoftDeleteBehavior : Update the associated model also HOT 2
- Referer Component - remeber referer on error HOT 2
- SoftDeleteBehavior: support only one deleted date field HOT 3
- Test failing HOT 1
- Soft Deletable doesn't work recursively HOT 2
- geting this error when using csvImporter HOT 1
- SluggableBehavior: non-alpha-numeric label results in empty slug HOT 4
- potential cacheQueries and SoftDeleteBehavior bug in SluggableBehavior HOT 4
- Sluggable: Some specials are not being replaced HOT 4
- SluggableBehavior - Proper way to save in a loop HOT 2
- potential bug when using both SoftDeleteBehavior and SluggableBehavior HOT 2
- SoftDelete deleting records ("hard delete") HOT 3
- SerializeableBehavior afterFind() not working and no test case present
- PublishableBehavior afterFind proposal HOT 1
- SoftDeleteBehavior & Unit Testing = Error: Table users for model User was not found in datasource test. HOT 10
- Soft delete does not support atomic option on CakePHP 2.6+ HOT 2
- ListBehavior when creating a new item HOT 2
- SoftDelete Behavior broken for relationships if alias is different from className HOT 1
- ToggleableBehavior for 3.x HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from utils.