# |
Dec 7th 2017, 14:18 |
neon1024 |
Perhaps my haircut has allowed my brain to reach optimal operating temparature |
# |
Dec 7th 2017, 14:18 |
neon1024 |
Maple and Pecan crunch with Honey Cheerios actually. I was between boxes |
# |
Dec 7th 2017, 14:17 |
birdy247 |
Someone had their cornflakes for breakfast today :slightly_smiling_face: |
# |
Dec 7th 2017, 14:17 |
birdy247 |
:+1: |
# |
Dec 7th 2017, 14:17 |
neon1024 |
Read Marco’s blog ;) https://ocramius.github.io/ |
# |
Dec 7th 2017, 14:15 |
neon1024 |
Which could make testing it easier |
# |
Dec 7th 2017, 14:15 |
neon1024 |
Perhaps the code needs refactoring |
# |
Dec 7th 2017, 14:15 |
neon1024 |
If your entity method is “quite involved” I would wonder if that’s a code smell |
# |
Dec 7th 2017, 14:14 |
neon1024 |
If it increases your coverage by 0.01% so what! |
# |
Dec 7th 2017, 14:14 |
neon1024 |
If you want to write BirdyEntityTest.php you go for it! |
# |
Dec 7th 2017, 14:14 |
neon1024 |
Not about where to put a test? |
# |
Dec 7th 2017, 14:14 |
birdy247 |
But point taken |
# |
Dec 7th 2017, 14:14 |
birdy247 |
I was asking a refactor question |
# |
Dec 7th 2017, 14:13 |
birdy247 |
It does exist :slightly_smiling_face: |
# |
Dec 7th 2017, 14:13 |
neon1024 |
You cannot refactor code which doesn’t exist |
# |
Dec 7th 2017, 14:13 |
neon1024 |
If it works, super, if you can refactor it to make it less crap, great! |
# |
Dec 7th 2017, 14:12 |
neon1024 |
So just write what you want to write and crack on |
# |
Dec 7th 2017, 14:12 |
neon1024 |
You can try all you want to get stuff right, but in the end it’ll be garbage in a week anyway |
# |
Dec 7th 2017, 14:12 |
neon1024 |
Which is why pre-optimisation is the devils work |
# |
Dec 7th 2017, 14:12 |
neon1024 |
Procrastinating about best practise delays development |
# |
Dec 7th 2017, 14:12 |
neon1024 |
Getting stuff working moves your project on |
# |
Dec 7th 2017, 14:12 |
neon1024 |
As soon as your save your code it’s legacy |
# |
Dec 7th 2017, 14:11 |
neon1024 |
Or if someone tells you there is, next week it’ll be legacy and the next thing will come along |
# |
Dec 7th 2017, 14:11 |
neon1024 |
Like most things in life there isn’t a best way |
# |
Dec 7th 2017, 14:11 |
neon1024 |
You’re pre-optimising |
# |
Dec 7th 2017, 14:11 |
neon1024 |
I disagree |
# |
Dec 7th 2017, 14:10 |
birdy247 |
Short term loss long term gain, would rather get things right to save time further down the line |
# |
Dec 7th 2017, 14:10 |
neon1024 |
See what works for you |
# |
Dec 7th 2017, 14:10 |
neon1024 |
Just experiment and have a play about |
# |
Dec 7th 2017, 14:10 |
neon1024 |
You seem to need someone to sign off all your choices before you make them |
# |
Dec 7th 2017, 14:09 |
neon1024 |
I wonder how you get any work done |
# |
Dec 7th 2017, 14:09 |
neon1024 |
You doubt yourself a lot |
# |
Dec 7th 2017, 14:09 |
birdy247 |
its quite involved |
# |
Dec 7th 2017, 14:09 |
birdy247 |
so is this a sign this method is in the wrong place? |
# |
Dec 7th 2017, 14:09 |
neon1024 |
They often don’t contain sufficient logic to warrant testing |
# |
Dec 7th 2017, 14:09 |
neon1024 |
In most cases I wouldn’t bother |
# |
Dec 7th 2017, 14:08 |
birdy247 |
like how would you test the getters and setters work as expected? |
# |
Dec 7th 2017, 14:05 |
birdy247 |
so would I create a test in the model? |
# |
Dec 7th 2017, 14:04 |
birdy247 |
into the entity |
# |
Dec 7th 2017, 14:04 |
birdy247 |
We have added a method called getPaymentDate |
# |
Dec 7th 2017, 14:04 |
neon1024 |
There is nothing to test, which is why bake doesn’t write any tests |