{"action":"opened","issue":{"number":188,"created_at":"2011-10-09T15:41:00Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Scope of Change\n====\nAt the moment, there are three possible outcomes of a unittest: Succeeded,\nSkipped and Failed. This RFC suggests adding more kinds of outcomes: \nWarnings, Error and NotRun.\n\n\nRationale\n====\nBe able to distinguish between the different non-success reasons.\n\n\nFunctionality\n====\nThe new outcomes are represented by these new classes:\n\n\n```php\n<?php\n  // Test succeeded but PHP warnings and/or notices were raised\n  class TestWarnings implements TestFailure {\n  }\n  \n  // An exception other than unittest.AssertionFailedError was raised\n  class TestError implements TestFailure {\n  }\n  \n  // The test was not run because an @ignore annotation was present\n  class TestNotRun implements TestSkipped {\n  }\n?>\n```\n\nThe existing classes TestSuccess, TestFailure and TestSkipped are turned\ninto interfaces and the concrete implementations moved to the following\nnew classes:\n\n\n```php\n<?php\n  // Test succeeded\n  class TestExpectationMet implements TestSuccess {\n  }\n  \n  // An AssertionFailedError was thrown - e.g. because one of the \n  // assert*() methods failed or fail() was called explicitely\n  class TestAssertionFailed implements TestFailure {\n  }\n  \n  // A PrerequisitesNotMetError was thrown in setUp() or @beforeClass\n  class TestPrerequisitesNotMet implements TestSkipped {\n  }\n?>\n```\n\nDefinitions\n----\n<summary>\nThese current outcomes are defined:\n* \".\" - Succeeded (Test was successful)\n* \"S\" - Skipped (Test was skipped by either an error inside setUp() or by\n  an @ignore annotation)\n* \"F\" - Failed (Test failed due to an assertion error, an expected exception\n  not being caught or by an exception raised by the code inside).\n\nExample output:\n\n```\n  [..SSFFF]\n  2 succeeded, 2 skipped, 3 failed\n\n```\n</summary>\n\n<summary>\nThis RFC suggests to add the following new outcomes:\n* \"W\" - Warning (One or more PHP errors were raised)\n* \"E\" - Error (An exception other than AssertionFailedError was thrown when\n  executing the test and no @expected annotation existed)\n* \"N\" - Not run (Test was ignored by @ignore, as stated above, this is currently \n  also reported as \"skipped\")\n\nExample output:\n\n```\n  [..SNFFE]\n  2 succeeded, 2 skipped, 3 failed\n\n```\n</summary>\n\nSecurity considerations\n====\nn/a\n\n\nSpeed impact\n====\nn/a\n\n\nDependencies\n====\nNo BC break: All instanceof checks on TestFailure, TestSuccess and \nTestSkipped will continue to work as expected due to the classes being \nconverted to interfaces.\n\n\nRelated documents\n====\n* http://msdn.microsoft.com/en-us/library/ms243180(VS.100).aspx\n* http://www.phpunit.de/manual/current/en/textui.html\n* http://www.nunit.org/index.php?p=nunit-console&r=2.5.2\n\nImplementing patch:\n* http://xp-framework.net/rfc/contrib/rfc0188.diff\n\nComments\n====\n\n<EOF>\n","comments":0,"title":"RFC 0188: Test outcome","updated_at":"2011-10-09T15:41:00Z","url":"https://api.github.com/repos/thekid/rfc/issues/188","id":1856692,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/26f07e3b262e9a80436f368cb11bd0c2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/thekid","id":696742,"login":"thekid"},"html_url":"https://github.com/thekid/rfc/issues/188","labels":[{"name":"rfc","url":"https://api.github.com/repos/thekid/rfc/labels/rfc","color":"02e10c"}],"state":"open"},"legacy":{"number":188,"action":"opened","issue":1856692}}