Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

FIX Nice errors and allows flush on module removal #2257

Merged
merged 1 commit into from Jul 23, 2013

Conversation

Projects
None yet
4 participants
Owner

hafriedlander commented Jul 22, 2013

No description provided.

Owner

sminnee commented Jul 23, 2013

It looks like your test is now out of date:

  1. ErrorControlChainTest::testErrorSuppression
    This error should be suppressed
    /home/travis/builds/ss/framework/tests/core/startup/ErrorControlChainTest.php:10
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:95
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:87
    /home/travis/builds/ss/framework/tests/core/startup/ErrorControlChainTest.php:12
    /home/travis/.phpenv/versions/5.3.26/bin/phpunit:46
  2. ErrorControlChainTest::testMultipleErrorSuppression
    This error should be suppressed
    /home/travis/builds/ss/framework/tests/core/startup/ErrorControlChainTest.php:22
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:95
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:87
    /home/travis/builds/ss/framework/tests/core/startup/ErrorControlChainTest.php:27
    /home/travis/.phpenv/versions/5.3.26/bin/phpunit:46
  3. ErrorControlChainTest::testExceptionSuppression
    Exception: This exception should be suppressed
    /home/travis/builds/ss/framework/tests/core/startup/ErrorControlChainTest.php:37
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:95
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:87
    /home/travis/builds/ss/framework/tests/core/startup/ErrorControlChainTest.php:39
    /home/travis/.phpenv/versions/5.3.26/bin/phpunit:46
  4. ErrorControlChainTest::testMultipleExceptionSuppression
    Exception: This exception should be suppressed
    /home/travis/builds/ss/framework/tests/core/startup/ErrorControlChainTest.php:49
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:95
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:87
    /home/travis/builds/ss/framework/tests/core/startup/ErrorControlChainTest.php:54
    /home/travis/.phpenv/versions/5.3.26/bin/phpunit:46
  5. ErrorControlChainTest::testErrorControl
    An error
    /home/travis/builds/ss/framework/tests/core/startup/ErrorControlChainTest.php:69
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:95
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:98
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:98
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:98
    /home/travis/builds/ss/framework/core/startup/ErrorControlChain.php:87
    /home/travis/builds/ss/framework/tests/core/startup/ErrorControlChainTest.php:75
    /home/travis/.phpenv/versions/5.3.26/bin/phpunit:46
Owner

hafriedlander commented Jul 23, 2013

Yup, suspected that might happen - just wanted camspier to confirm the fix was good. I'll fix tests in a sec.

Owner

sminnee commented Jul 23, 2013

Happy to merge this once the tests are fixed.

Owner

sminnee commented Jul 23, 2013

Ooh, while you're at it, you might want to add a test that this works when called within a ErrorControl block:

$array = null;
$this->assertNull(@$array['key']);

@sminnee sminnee added a commit that referenced this pull request Jul 23, 2013

@sminnee sminnee Merge pull request #2257 from hafriedlander/fix/flush_30
FIX Nice errors and allows flush on module removal
3c6ba1c

@sminnee sminnee merged commit 3c6ba1c into silverstripe:3.0 Jul 23, 2013

1 check passed

default Scrutinizer: Errored — Travis: Passed
Details

@tractorcow tractorcow commented on the diff Mar 31, 2016

tests/core/startup/ErrorControlChainTest.php
class ErrorControlChainTest extends SapphireTest {
+ function setUp() {
+ // Check we can run PHP at all
+ $null = is_writeable('/dev/null') ? '/dev/null' : 'NUL';
@tractorcow

tractorcow Mar 31, 2016

Contributor

NUL?

@SpiritLevel

SpiritLevel Mar 31, 2016

Contributor
On 16-03-31 04:17 PM, Damian Mooyman
  wrote:


  In tests/core/startup/ErrorControlChainTest.php:
  >  class ErrorControlChainTest extends SapphireTest {
  • function setUp() {
  • // Check we can run PHP at all
    
  • $null = is_writeable('/dev/null') ? '/dev/null' : 'NUL';
    
  NUL?
  —
    You are receiving this because you are subscribed to this
    thread.
    Reply to this email directly or view
      it on GitHub








It's how you say NULL in
  French :P
@hafriedlander

hafriedlander Apr 4, 2016

Owner

Already told Damian in person, but for posterity, it's a windows thing. http://ss64.com/nt/nul.html

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