Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Test/Db/Adapter/Platform/SqlServerTest restore_error_handler(); #6790

Merged
merged 1 commit into from
Feb 24, 2015
Merged

Test/Db/Adapter/Platform/SqlServerTest restore_error_handler(); #6790

merged 1 commit into from
Feb 24, 2015

Conversation

turrsis
Copy link
Contributor

@turrsis turrsis commented Oct 22, 2014

Error handler should be restore for the following tests

@samsonasik
Copy link
Contributor

travis build failures

There were 2 failures:

1) ZendTest\Db\Adapter\Platform\SqliteTest::testQuoteValue

Failed asserting that exception of type "PHPUnit_Framework_Error" is thrown.

2) ZendTest\Db\Adapter\Platform\SqliteTest::testQuoteValueList

Failed asserting that exception of type "PHPUnit_Framework_Error" is thrown.

@turrsis turrsis changed the title Test/Db/Adapter/Platform/SqlServerTest restore_error_handler(); [WIP] Test/Db/Adapter/Platform/SqlServerTest restore_error_handler(); Oct 22, 2014
@turrsis turrsis changed the title [WIP] Test/Db/Adapter/Platform/SqlServerTest restore_error_handler(); Test/Db/Adapter/Platform/SqlServerTest restore_error_handler(); Oct 22, 2014
@turrsis
Copy link
Contributor Author

turrsis commented Oct 22, 2014

I don't know why, but for Windows set_error_handler(function () {} ); return incorrect handler.

@Martin-P
Copy link
Contributor

The original code does exactly the same as your suggestion, it only uses set_error_handler() instead of restore_error_handler(). Perhaps you can explain what was broken that needs fixing?

@turrsis
Copy link
Contributor Author

turrsis commented Nov 20, 2014

@Martin-P May be this is my enviroment, may be else. What sense to investigate this?

@@ -142,10 +142,10 @@ public function testSetDriver()

public function testPlatformQuotesNullByteCharacter()
{
$err = set_error_handler(function () {} );
set_error_handler(function () {} );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the Stdlib error handler here instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can use Stdlib\ErrorHandler::start() / Stdlib\ErrorHandler::stop().
But I can't see sense, because Stdlib\ErrorHandler::stop() use restore_error_handler()

Ocramius added a commit that referenced this pull request Dec 7, 2014
@weierophinney weierophinney added this to the 2.4.0 milestone Feb 19, 2015
@weierophinney weierophinney merged commit 130d146 into zendframework:develop Feb 24, 2015
weierophinney added a commit that referenced this pull request Feb 24, 2015
…erverTest

Test/Db/Adapter/Platform/SqlServerTest restore_error_handler();
weierophinney added a commit that referenced this pull request Feb 24, 2015
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants