Log message #4185464

# At Username Text
# May 3rd 2019, 14:12 maymeow It would be good to have something like laravel factories for testing :) @neon1024
# May 3rd 2019, 13:54 neon1024 Which would be more of an integration test, but would be less fragile
# May 3rd 2019, 13:54 neon1024 Or I’d build a query object, with contains and assert that the query object contained the correct associations
# May 3rd 2019, 13:53 neon1024 Then I’d update my test every single time I changed an association in that table
# May 3rd 2019, 13:53 neon1024 If I needed to test an association, I would just read the association config array and assert it
# May 3rd 2019, 13:47 maymeow Is there any good practices how to test model with relationships??? (fixtures don't have relations defined).. it is defined here user_id for example but if i need remove id from related fixture because of postgres test its not relevant. how do you guys testing actions that reqire related models?
# May 3rd 2019, 12:40 Arckame thank you
# May 3rd 2019, 12:39 Arckame but i will try a plugin, my first idea was probably not the best.
# May 3rd 2019, 12:39 Arckame yep, but working as a plugin, I had in mind something like create a Database/Driver/<driver>.php in my src folder.
# May 3rd 2019, 12:36 admad Arckame: that's how https://github.com/CakeDC/cakephp-oracle-driver :slightly_smiling_face:
# May 3rd 2019, 12:33 Arckame Any idea about how to properly implement a new database driver in Cake 3.7 ?
# May 3rd 2019, 12:30 Arckame hello
# May 3rd 2019, 11:55 admad @kgb.acct.personal you can't change the query string variable. You would have to use your own paginator class and helper for that
# May 3rd 2019, 11:54 martin I was unable to find it, also checked the saved entity but also not in there
# May 3rd 2019, 11:53 admad it should be within that entity
# May 3rd 2019, 11:53 martin hmm it is a validation error in a relation. That should also be showed there I guess?
# May 3rd 2019, 11:48 martin I hate errors like this, it has an error during save, but it does not tell what the error is :(
# May 3rd 2019, 11:21 noel @waspinator thanks for the stackoverflow link.. that’s a self-referencing many-to-one association though, not many-to-many
# May 3rd 2019, 09:14 spriz Oh well, that will work just fine! Thanks :)
# May 3rd 2019, 09:12 spriz :cold_sweat:
# May 3rd 2019, 09:12 neon1024 TIL
# May 3rd 2019, 09:11 neon1024 > a character symbolizing the idea of a thing without indicating the sounds used to say it. Examples include numerals and Chinese characters.
# May 3rd 2019, 09:11 neon1024 I wonder what an ‘ideograph’ is :thinking_face:
# May 3rd 2019, 09:11 neon1024 > matches a letter or ideograph that does not have lowercase and uppercase variants
# May 3rd 2019, 09:10 neon1024 https://regex101.com/r/b3yYqN/1
# May 3rd 2019, 09:10 neon1024 Accents I mean. Geez, perhaps I need a second coffee today!
# May 3rd 2019, 09:10 neon1024 So it’ll understand `Chloë`
# May 3rd 2019, 09:10 neon1024 Ahh, it’s using tokens for matching non latins
# May 3rd 2019, 09:09 neon1024 I can’t understand that one
# May 3rd 2019, 09:09 neon1024 Yeah, that’s what I said :flushed:
# May 3rd 2019, 09:09 spriz The regex power is strong is this one
# May 3rd 2019, 09:09 spriz `/^[\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]+$/Du` :)
# May 3rd 2019, 09:09 neon1024 ,:)
# May 3rd 2019, 09:08 spriz it is still a thing @neon1024 https://api.cakephp.org/3.7/class-Cake.Validation.Validator.html#_alphaNumeric
# May 3rd 2019, 09:08 neon1024 As that’s just [\d\w]+ I think
# May 3rd 2019, 09:07 neon1024 Is that still a rule in 3.7/
# May 3rd 2019, 09:07 neon1024 alphaNumeric?
# May 3rd 2019, 09:05 spriz It sure does - I would do it that way, but whenver I've used regex validation rule before I usually end up finding another rule that would do the job later :) :)
# May 3rd 2019, 09:03 Martin` some validation with regex maybe? does that exist?
# May 3rd 2019, 09:00 spriz Hi folks! I have a field on my entity that should not contain whitespaces - is there some sneaky validation rule I should use rather than writing my own? :) : D
# May 3rd 2019, 08:31 kgb.acct.personal Got it. I'll see for myself