Added optional charset to pdo dsn #5064

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
@stefankleff
Contributor

stefankleff commented Sep 2, 2013

It was not possible to set the charset of the connection, now it can be passed as configuration parameter.

If somebody could give me a hint how - I'll also write a test :)

@EvanDotPro

This comment has been minimized.

Show comment Hide comment
@EvanDotPro

EvanDotPro Sep 3, 2013

Member

The correct place to add a test for this would be ./tests/ZendTest/Db/Adapter/Driver/Pdo/ConnectionTest.php.

Unfortunately, it looks like there's not really any existing tests for this class for you to reference. Also, the way the connect() method is written doesn't allow for testing the DSN string building without actually invoking a real database connection, so writing a clean test for this without some refactoring would be pretty tough.

Member

EvanDotPro commented Sep 3, 2013

The correct place to add a test for this would be ./tests/ZendTest/Db/Adapter/Driver/Pdo/ConnectionTest.php.

Unfortunately, it looks like there's not really any existing tests for this class for you to reference. Also, the way the connect() method is written doesn't allow for testing the DSN string building without actually invoking a real database connection, so writing a clean test for this without some refactoring would be pretty tough.

@stefankleff

This comment has been minimized.

Show comment Hide comment
@stefankleff

stefankleff Sep 6, 2013

Contributor

That's why I've asked :) Unfortunately I don't have the time to refactor the class (and add test for that too).

Contributor

stefankleff commented Sep 6, 2013

That's why I've asked :) Unfortunately I don't have the time to refactor the class (and add test for that too).

@ralphschindler

This comment has been minimized.

Show comment Hide comment
@ralphschindler

ralphschindler Nov 15, 2013

Member

I believe this was addressed with #4973

Member

ralphschindler commented Nov 15, 2013

I believe this was addressed with #4973

@ralphschindler ralphschindler self-assigned this Mar 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment