Hi Adam, Providing my input on why I voted "NO". Your proposed new method is not pure. This means it does have distinct responses depending on where it's located in the code. That's a big no-no for me.
Cheers, On Tue, Dec 6, 2016 at 12:15 PM, Lester Caine <les...@lsces.co.uk> wrote: > On 06/12/16 16:30, Adam Baratz wrote: > >> This issue is not difficult to solve in userland, at least well enough > for > >> debugging in my experience. Here's an older example I wrote up on my > blog > >> that worked (but I'm told is broken right now): > https://daveyshafik.com/ > >> archives/605-debugging-pdo-prepared-statements.html > >> > > I want to be able to write .phpt tests that validate how values are > getting > > interpolated into emulated prepares. Since this creates a separate code > > path, it wouldn't let me validate what gets sent to the server. > > PDO::quote() doesn't necessarily produce the same output as > > pdo_parse_params(). > > The whole point of testing is that it tests real results not testing > 'test code' that tries to emulate the real world. The whole point of > 'emulated prepare statements' is that it creates a SQL query that the > target database engine can actually work with rather than one that a > more capable database engine will process. Testing the innards of some > driver is simply wrong, one tests the whole process is working! And > IDEALLY the test suit for PDO should work which ever target is selected, > but that is not lightly to happen any time soon. > > -- > Lester Caine - G8HFL > ----------------------------- > Contact - http://lsces.co.uk/wiki/?page=contact > L.S.Caine Electronic Services - http://lsces.co.uk > EnquirySolve - http://enquirysolve.com/ > Model Engineers Digital Workshop - http://medw.co.uk > Rainbow Digital Media - http://rainbowdigitalmedia.co.uk > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Guilherme Blanco Senior Technical Architect at Huge Inc.