Comments (4)
Which branch are you using? I've added a few more tests and I can not verify this wrong behaviour in the develop branch. Tests in master branch pass also.
Can you please provide a test case for that in a pull request? Thank you.
from utils.
I downloaded the Master branch on 2012-12-27. But I see it was fixed in the develop branch a while ago.
See: #49.
Master branch is still wrong though, tests are also incomplete:
/**
* Test save unique
*
* @return void
*/
public function testSaveUnique() {
$this->Model->create(array('title' => 'Fourth Article'));
$this->Model->save();
$this->Model->create(array('title' => 'Fourth Article!!'));
$this->Model->save();
$this->Model->create(array('title' => 'Fourth "Article"'));
$this->Model->save();
$results = $this->Model->find('all', array('conditions' => array('title LIKE' => 'Fourth%')));
$this->assertEqual(count($results), 3);
$this->assertEqual($results[0]['SluggedArticle']['slug'], 'fourth_article');
$this->assertEqual($results[1]['SluggedArticle']['slug'], 'fourth_article_1');
$this->assertEqual($results[2]['SluggedArticle']['slug'], 'fourth_article_2');
}
If you'd add a fourth create with just "Fourth" as a title, the slug will be "fourth_1" instead of "fourth".
from utils.
I'll try to do a merge to master until the end of the week. There are a few other things that need to be done in the plugin before we can merge it to master.
Thanks for the detailed error report! :) 👍
from utils.
This has been fixed in the develop branch, see also the tests for it.
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.