\PHPUnit_Framework_TestCase
A TestCase defines the fixture to run multiple tests.
To define a TestCase
1) Implement a subclass of PHPUnit_Framework_TestCase.
2) Define instance variables that store the state of the fixture.
3) Initialize the fixture state by overriding setUp().
4) Clean-up after a test by overriding tearDown().
Each test runs in its own fixture so there can be no side effects
among test runs.
Here is an example:
<code>
<?php
class MathTest extends PHPUnit_Framework_TestCase
{
public $value1;
public $value2;
protected function setUp()
{
$this->value1 = 2;
$this->value2 = 3;
}
}
?>
</code>
For each test implement a method which interacts with the fixture.
Verify the expected results with assertions specified by calling
assert with a boolean.
<code>
<?php
public function testPass()
{
$this->assertTrue($this->value1 + $this->value2 == 5);
}
?>
</code>
- Author: Sebastian Bergmann <sebastian@phpunit.de>
- Copyright: 2001-2014 Sebastian Bergmann <sebastian@phpunit.de>
- License: http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
Synopsis
- // members
- protected boolean $backupGlobals;
- protected array $backupGlobalsBlacklist;
- protected boolean $backupStaticAttributes;
- protected array $backupStaticAttributesBlacklist;
- protected boolean $runTestInSeparateProcess;
- protected boolean $preserveGlobalState;
- private boolean $inIsolation;
- private array $data;
- private string $dataName;
- private boolean $useErrorHandler;
- private mixed $expectedException;
- private string $expectedExceptionMessage;
- private string $expectedExceptionMessageRegExp;
- private integer $expectedExceptionCode;
- private string $name;
- private array $dependencies;
- private array $dependencyInput;
- private array $iniSettings;
- private array $locale;
- private array $mockObjects;
- private array $mockObjectGenerator;
- private integer $status;
- private string $statusMessage;
- private integer $numAssertions;
- private PHPUnit_Framework_TestResult $result;
- private mixed $testResult;
- private string $output;
- private string $outputExpectedRegex;
- private string $outputExpectedString;
- private bool $hasPerformedExpectationsOnOutput;
- private mixed $outputCallback;
- private boolean $outputBufferingActive;
- private integer $outputBufferingLevel;
- // methods
- public void __construct()
- public string toString()
- public integer count()
- public array getAnnotations()
- public string getName()
- public integer getSize()
- public string getActualOutput()
- public boolean hasOutput()
- public void expectOutputRegex()
- public void expectOutputString()
- public bool hasPerformedExpectationsOnOutput()
- public string getExpectedException()
- public void setExpectedException()
- public void setExpectedExceptionRegExp()
- protected void setExpectedExceptionFromAnnotation()
- public void setUseErrorHandler()
- protected void setUseErrorHandlerFromAnnotation()
- protected void checkRequirements()
- public integer getStatus()
- public string getStatusMessage()
- public boolean hasFailed()
- public PHPUnit_Framework_TestResult run()
- public void runBare()
- protected mixed runTest()
- protected void verifyMockObjects()
- public void setName()
- public void setDependencies()
- public boolean hasDependencies()
- public void setDependencyInput()
- public void setBackupGlobals()
- public void setBackupStaticAttributes()
- public void setRunTestInSeparateProcess()
- public void setPreserveGlobalState()
- public void setInIsolation()
- public boolean isInIsolation()
- public mixed getResult()
- public void setResult()
- public void setOutputCallback()
- public PHPUnit_Framework_TestResult getTestResultObject()
- public void setTestResultObject()
- protected void iniSet()
- protected void setLocale()
- public PHPUnit_Framework_MockObject_MockObject getMock()
- public PHPUnit_Framework_MockObject_MockBuilder getMockBuilder()
- protected string getMockClass()
- public PHPUnit_Framework_MockObject_MockObject getMockForAbstractClass()
- protected PHPUnit_Framework_MockObject_MockObject getMockFromWsdl()
- public PHPUnit_Framework_MockObject_MockObject getMockForTrait()
- protected getObjectForTrait()
- public void addToAssertionCount()
- public integer getNumAssertions()
- public static PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount any()
- public static PHPUnit_Framework_MockObject_Matcher_InvokedCount never()
- public static PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount atLeast()
- public static PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce atLeastOnce()
- public static PHPUnit_Framework_MockObject_Matcher_InvokedCount once()
- public static PHPUnit_Framework_MockObject_Matcher_InvokedCount exactly()
- public static PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount atMost()
- public static PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex at()
- public static PHPUnit_Framework_MockObject_Stub_Return returnValue()
- public static PHPUnit_Framework_MockObject_Stub_ReturnValueMap returnValueMap()
- public static PHPUnit_Framework_MockObject_Stub_ReturnArgument returnArgument()
- public static PHPUnit_Framework_MockObject_Stub_ReturnCallback returnCallback()
- public static PHPUnit_Framework_MockObject_Stub_ReturnSelf returnSelf()
- public static PHPUnit_Framework_MockObject_Stub_Exception throwException()
- public static PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls onConsecutiveCalls()
- protected string dataToString()
- protected string getDataSetAsString()
- protected PHPUnit_Framework_TestResult createResult()
- protected void handleDependencies()
- public static void setUpBeforeClass()
- protected void setUp()
- protected void assertPreConditions()
- protected void assertPostConditions()
- protected void tearDown()
- public static void tearDownAfterClass()
- protected void onNotSuccessfulTest()
- protected void prepareTemplate()
- protected PHPUnit_Framework_MockObject_Generator getMockObjectGenerator()
- private void startOutputBuffering()
- private void stopOutputBuffering()
- // Inherited methods from PHPUnit_Framework_Assert
- public static void assertArrayHasKey()
- public static void assertArraySubset()
- public static void assertArrayNotHasKey()
- public static void assertContains()
- public static void assertAttributeContains()
- public static void assertNotContains()
- public static void assertAttributeNotContains()
- public static void assertContainsOnly()
- public static void assertContainsOnlyInstancesOf()
- public static void assertAttributeContainsOnly()
- public static void assertNotContainsOnly()
- public static void assertAttributeNotContainsOnly()
- public static void assertCount()
- public static void assertAttributeCount()
- public static void assertNotCount()
- public static void assertAttributeNotCount()
- public static void assertEquals()
- public static void assertAttributeEquals()
- public static void assertNotEquals()
- public static void assertAttributeNotEquals()
- public static void assertEmpty()
- public static void assertAttributeEmpty()
- public static void assertNotEmpty()
- public static void assertAttributeNotEmpty()
- public static void assertGreaterThan()
- public static void assertAttributeGreaterThan()
- public static void assertGreaterThanOrEqual()
- public static void assertAttributeGreaterThanOrEqual()
- public static void assertLessThan()
- public static void assertAttributeLessThan()
- public static void assertLessThanOrEqual()
- public static void assertAttributeLessThanOrEqual()
- public static void assertFileEquals()
- public static void assertFileNotEquals()
- public static void assertStringEqualsFile()
- public static void assertStringNotEqualsFile()
- public static void assertFileExists()
- public static void assertFileNotExists()
- public static void assertTrue()
- public static void assertNotTrue()
- public static void assertFalse()
- public static void assertNotFalse()
- public static void assertNotNull()
- public static void assertNull()
- public static void assertClassHasAttribute()
- public static void assertClassNotHasAttribute()
- public static void assertClassHasStaticAttribute()
- public static void assertClassNotHasStaticAttribute()
- public static void assertObjectHasAttribute()
- public static void assertObjectNotHasAttribute()
- public static void assertSame()
- public static void assertAttributeSame()
- public static void assertNotSame()
- public static void assertAttributeNotSame()
- public static void assertInstanceOf()
- public static void assertAttributeInstanceOf()
- public static void assertNotInstanceOf()
- public static void assertAttributeNotInstanceOf()
- public static void assertInternalType()
- public static void assertAttributeInternalType()
- public static void assertNotInternalType()
- public static void assertAttributeNotInternalType()
- public static void assertRegExp()
- public static void assertNotRegExp()
- public static void assertSameSize()
- public static void assertNotSameSize()
- public static void assertStringMatchesFormat()
- public static void assertStringNotMatchesFormat()
- public static void assertStringMatchesFormatFile()
- public static void assertStringNotMatchesFormatFile()
- public static void assertStringStartsWith()
- public static void assertStringStartsNotWith()
- public static void assertStringEndsWith()
- public static void assertStringEndsNotWith()
- public static void assertXmlFileEqualsXmlFile()
- public static void assertXmlFileNotEqualsXmlFile()
- public static void assertXmlStringEqualsXmlFile()
- public static void assertXmlStringNotEqualsXmlFile()
- public static void assertXmlStringEqualsXmlString()
- public static void assertXmlStringNotEqualsXmlString()
- public static void assertEqualXMLStructure()
- public static void assertSelectCount()
- public static void assertSelectRegExp()
- public static void assertSelectEquals()
- public static void assertTag()
- public static void assertNotTag()
- public static void assertThat()
- public static void assertJson()
- public static void assertJsonStringEqualsJsonString()
- public static void assertJsonStringNotEqualsJsonString()
- public static void assertJsonStringEqualsJsonFile()
- public static void assertJsonStringNotEqualsJsonFile()
- public static void assertJsonFileNotEqualsJsonFile()
- public static void assertJsonFileEqualsJsonFile()
- public static PHPUnit_Framework_Constraint_And logicalAnd()
- public static PHPUnit_Framework_Constraint_Or logicalOr()
- public static PHPUnit_Framework_Constraint_Not logicalNot()
- public static PHPUnit_Framework_Constraint_Xor logicalXor()
- public static PHPUnit_Framework_Constraint_IsAnything anything()
- public static PHPUnit_Framework_Constraint_IsTrue isTrue()
- public static PHPUnit_Framework_Constraint_Callback callback()
- public static PHPUnit_Framework_Constraint_IsFalse isFalse()
- public static PHPUnit_Framework_Constraint_IsJson isJson()
- public static PHPUnit_Framework_Constraint_IsNull isNull()
- public static PHPUnit_Framework_Constraint_Attribute attribute()
- public static PHPUnit_Framework_Constraint_TraversableContains contains()
- public static PHPUnit_Framework_Constraint_TraversableContainsOnly containsOnly()
- public static PHPUnit_Framework_Constraint_TraversableContainsOnly containsOnlyInstancesOf()
- public static PHPUnit_Framework_Constraint_ArrayHasKey arrayHasKey()
- public static PHPUnit_Framework_Constraint_IsEqual equalTo()
- public static PHPUnit_Framework_Constraint_Attribute attributeEqualTo()
- public static PHPUnit_Framework_Constraint_IsEmpty isEmpty()
- public static PHPUnit_Framework_Constraint_FileExists fileExists()
- public static PHPUnit_Framework_Constraint_GreaterThan greaterThan()
- public static PHPUnit_Framework_Constraint_Or greaterThanOrEqual()
- public static PHPUnit_Framework_Constraint_ClassHasAttribute classHasAttribute()
- public static PHPUnit_Framework_Constraint_ClassHasStaticAttribute classHasStaticAttribute()
- public static PHPUnit_Framework_Constraint_ObjectHasAttribute objectHasAttribute()
- public static PHPUnit_Framework_Constraint_IsIdentical identicalTo()
- public static PHPUnit_Framework_Constraint_IsInstanceOf isInstanceOf()
- public static PHPUnit_Framework_Constraint_IsType isType()
- public static PHPUnit_Framework_Constraint_LessThan lessThan()
- public static PHPUnit_Framework_Constraint_Or lessThanOrEqual()
- public static PHPUnit_Framework_Constraint_PCREMatch matchesRegularExpression()
- public static PHPUnit_Framework_Constraint_StringMatches matches()
- public static PHPUnit_Framework_Constraint_StringStartsWith stringStartsWith()
- public static PHPUnit_Framework_Constraint_StringContains stringContains()
- public static PHPUnit_Framework_Constraint_StringEndsWith stringEndsWith()
- public static PHPUnit_Framework_Constraint_Count countOf()
- public static void fail()
- public static mixed readAttribute()
- public static mixed getStaticAttribute()
- public static mixed getObjectAttribute()
- public static void markTestIncomplete()
- public static void markTestSkipped()
- public static integer getCount()
- public static void resetCount()
Hierarchy
Extends
Extended by
Implements
Violations
PHPMessDetector
Line | Rule | Message |
---|---|---|
605 - 718 | CyclomaticComplexity | The method run() has a Cyclomatic Complexity of 20. The configured cyclomatic complexity threshold is 10. |
605 - 718 | NPathComplexity | The method run() has an NPath complexity of 1800192. The configured NPath complexity threshold is 200. |
605 - 718 | ExcessiveMethodLength | The method run() has 114 lines of code. Current threshold is set to 100. Avoid really long methods. |
723 - 872 | CyclomaticComplexity | The method runBare() has a Cyclomatic Complexity of 32. The configured cyclomatic complexity threshold is 10. |
723 - 872 | NPathComplexity | The method runBare() has an NPath complexity of 460800. The configured NPath complexity threshold is 200. |
723 - 872 | ExcessiveMethodLength | The method runBare() has 150 lines of code. Current threshold is set to 100. Avoid really long methods. |
881 - 972 | CyclomaticComplexity | The method runTest() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10. |
881 - 972 | NPathComplexity | The method runTest() has an NPath complexity of 1072. The configured NPath complexity threshold is 200. |
1378 - 1385 | EvalExpression | The method getMockFromWsdl() contains an eval expression. |
1687 | UnusedLocalVariable | Avoid unused local variables such as '$key'. |
1691 | UnusedLocalVariable | Avoid unused local variables such as '$iRecursiveCheck'. |
1757 - 1816 | CyclomaticComplexity | The method handleDependencies() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10. |
1895 | UnusedFormalParameter | Avoid unused parameters such as '$template'. |
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
643 | 135 | warning | Line exceeds 120 characters; contains 134 characters |
651 | 126 | warning | Line exceeds 120 characters; contains 125 characters |
652 | 126 | warning | Line exceeds 120 characters; contains 125 characters |
653 | 126 | warning | Line exceeds 120 characters; contains 125 characters |
654 | 126 | warning | Line exceeds 120 characters; contains 125 characters |
655 | 126 | warning | Line exceeds 120 characters; contains 125 characters |
674 | 13 | warning | Line exceeds 120 characters; contains 122 characters |
1232 | 19 | error | Space after opening parenthesis of function call prohibited |
1232 | 19 | error | Expected 0 spaces before closing bracket; 1 found |
1252 | 128 | warning | Line exceeds 120 characters; contains 127 characters |
1253 | 148 | warning | Line exceeds 120 characters; contains 147 characters |
1254 | 154 | warning | Line exceeds 120 characters; contains 153 characters |
1255 | 164 | warning | Line exceeds 120 characters; contains 163 characters |
1262 | 254 | warning | Line exceeds 120 characters; contains 253 characters |
1308 | 233 | warning | Line exceeds 120 characters; contains 232 characters |
1341 | 246 | warning | Line exceeds 120 characters; contains 245 characters |
1371 | 181 | warning | Line exceeds 120 characters; contains 180 characters |
1416 | 230 | warning | Line exceeds 120 characters; contains 229 characters |
1448 | 210 | warning | Line exceeds 120 characters; contains 209 characters |
Members
private
- $data — array
- $dataName — string
- $dependencies — array
- $dependencyInput — array
- $expectedException
—
mixed
The name of the expected Exception. - $expectedExceptionCode
—
integer
The code of the expected Exception. - $expectedExceptionMessage
—
string
The message of the expected Exception. - $expectedExceptionMessageRegExp
—
string
The regex pattern to validate the expected Exception message. - $hasPerformedExpectationsOnOutput — bool
- $inIsolation
—
boolean
Whether or not this test is running in a separate PHP process. - $iniSettings — array
- $locale — array
- $mockObjectGenerator — array
- $mockObjects — array
- $name
—
string
The name of the test case. - $numAssertions — integer
- $output — string
- $outputBufferingActive — boolean
- $outputBufferingLevel — integer
- $outputCallback — mixed
- $outputExpectedRegex — string
- $outputExpectedString — string
- $result — PHPUnit_Framework_TestResult
- $status — integer
- $statusMessage — string
- $testResult — mixed
- $useErrorHandler — boolean
protected
- $backupGlobals
—
boolean
Enable or disable the backup and restoration of the $GLOBALS array. - $backupGlobalsBlacklist — array
- $backupStaticAttributes
—
boolean
Enable or disable the backup and restoration of static attributes. - $backupStaticAttributesBlacklist — array
- $preserveGlobalState
—
boolean
Whether or not this test should preserve the global state when running in a separate PHP process. - $runTestInSeparateProcess
—
boolean
Whether or not this test is to be run in a separate PHP process.
Methods
private
protected
- assertPostConditions() — Performs assertions shared by all tests of a test case.
- assertPreConditions() — Performs assertions shared by all tests of a test case.
- checkRequirements()
- createResult() — Creates a default TestResult object.
- dataToString()
- getDataSetAsString() — Gets the data set description of a TestCase.
- getMockClass() — Mocks the specified class and returns the name of the mocked class.
- getMockFromWsdl() — Returns a mock object based on the given WSDL file.
- getMockObjectGenerator() — Get the mock object generator, creating it if it doesn't exist.
- getObjectForTrait() — Returns an object for the specified trait.
- handleDependencies()
- iniSet() — This method is a wrapper for the ini_set() function that automatically resets the modified php.ini setting to its original value after the test is run.
- onNotSuccessfulTest() — This method is called when a test method did not execute successfully.
- prepareTemplate() — Performs custom preparations on the process isolation template.
- runTest() — Override to run the test and assert its state.
- setExpectedExceptionFromAnnotation()
- setLocale() — This method is a wrapper for the setlocale() function that automatically resets the locale to its original value after the test is run.
- setUp() — Sets up the fixture, for example, open a network connection.
- setUseErrorHandlerFromAnnotation()
- tearDown() — Tears down the fixture, for example, close a network connection.
- verifyMockObjects() — Verifies the mock object expectations.
public
- __construct() — Constructs a test case with the given name.
- addToAssertionCount() — Adds a value to the assertion counter.
- any() — Returns a matcher that matches when the method it is evaluated for is executed zero or more times.
- at() — Returns a matcher that matches when the method it is evaluated for is invoked at the given $index.
- atLeast() — Returns a matcher that matches when the method it is evaluated for is executed at least N times.
- atLeastOnce() — Returns a matcher that matches when the method it is evaluated for is executed at least once.
- atMost() — Returns a matcher that matches when the method it is evaluated for is executed at most N times.
- count() — Counts the number of test cases executed by run(TestResult result).
- exactly() — Returns a matcher that matches when the method it is evaluated for is executed exactly $count times.
- expectOutputRegex()
- expectOutputString()
- getActualOutput()
- getAnnotations() — Returns the annotations for this test.
- getExpectedException()
- getMock() — Returns a mock object for the specified class.
- getMockBuilder() — Returns a builder object to create mock objects using a fluent interface.
- getMockForAbstractClass() — Returns a mock object for the specified abstract class with all abstract methods of the class mocked. Concrete methods are not mocked by default.
- getMockForTrait() — Returns a mock object for the specified trait with all abstract methods of the trait mocked. Concrete methods to mock can be specified with the `$mockedMethods` parameter.
- getName() — Gets the name of a TestCase.
- getNumAssertions() — Returns the number of assertions performed by this test.
- getResult()
- getSize() — Returns the size of the test.
- getStatus() — Returns the status of this test.
- getStatusMessage() — Returns the status message of this test.
- getTestResultObject()
- hasDependencies() — Returns true if the tests has dependencies
- hasFailed() — Returns whether or not this test has failed.
- hasOutput()
- hasPerformedExpectationsOnOutput()
- isInIsolation()
- never() — Returns a matcher that matches when the method it is evaluated for is never executed.
- onConsecutiveCalls()
- once() — Returns a matcher that matches when the method it is evaluated for is executed exactly once.
- returnArgument()
- returnCallback()
- returnSelf() — Returns the current object.
- returnValue()
- returnValueMap()
- run() — Runs the test case and collects the results in a TestResult object.
- runBare() — Runs the bare test sequence.
- setBackupGlobals() — Calling this method in setUp() has no effect!
- setBackupStaticAttributes() — Calling this method in setUp() has no effect!
- setDependencies() — Sets the dependencies of a TestCase.
- setDependencyInput() — Sets
- setExpectedException()
- setExpectedExceptionRegExp()
- setInIsolation()
- setName() — Sets the name of a TestCase.
- setOutputCallback()
- setPreserveGlobalState()
- setResult()
- setRunTestInSeparateProcess()
- setTestResultObject()
- setUpBeforeClass() — This method is called before the first test of this test class is run.
- setUseErrorHandler()
- tearDownAfterClass() — This method is called after the last test of this test class is run.
- throwException()
- toString() — Returns a string representation of the test case.
Inherited from PHPUnit_Framework_Assert
public
- anything() — Returns a PHPUnit_Framework_Constraint_IsAnything matcher object.
- arrayHasKey() — Returns a PHPUnit_Framework_Constraint_ArrayHasKey matcher object.
- assertArrayHasKey() — Asserts that an array has a specified key.
- assertArrayNotHasKey() — Asserts that an array does not have a specified key.
- assertArraySubset() — Asserts that an array has a specified subset.
- assertAttributeContains() — Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object contains a needle.
- assertAttributeContainsOnly() — Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object contains only values of a given type.
- assertAttributeCount() — Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.
- assertAttributeEmpty() — Asserts that a static attribute of a class or an attribute of an object is empty.
- assertAttributeEquals() — Asserts that a variable is equal to an attribute of an object.
- assertAttributeGreaterThan() — Asserts that an attribute is greater than another value.
- assertAttributeGreaterThanOrEqual() — Asserts that an attribute is greater than or equal to another value.
- assertAttributeInstanceOf() — Asserts that an attribute is of a given type.
- assertAttributeInternalType() — Asserts that an attribute is of a given type.
- assertAttributeLessThan() — Asserts that an attribute is smaller than another value.
- assertAttributeLessThanOrEqual() — Asserts that an attribute is smaller than or equal to another value.
- assertAttributeNotContains() — Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object does not contain a needle.
- assertAttributeNotContainsOnly() — Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object does not contain only values of a given type.
- assertAttributeNotCount() — Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.
- assertAttributeNotEmpty() — Asserts that a static attribute of a class or an attribute of an object is not empty.
- assertAttributeNotEquals() — Asserts that a variable is not equal to an attribute of an object.
- assertAttributeNotInstanceOf() — Asserts that an attribute is of a given type.
- assertAttributeNotInternalType() — Asserts that an attribute is of a given type.
- assertAttributeNotSame() — Asserts that a variable and an attribute of an object do not have the same type and value.
- assertAttributeSame() — Asserts that a variable and an attribute of an object have the same type and value.
- assertClassHasAttribute() — Asserts that a class has a specified attribute.
- assertClassHasStaticAttribute() — Asserts that a class has a specified static attribute.
- assertClassNotHasAttribute() — Asserts that a class does not have a specified attribute.
- assertClassNotHasStaticAttribute() — Asserts that a class does not have a specified static attribute.
- assertContains() — Asserts that a haystack contains a needle.
- assertContainsOnly() — Asserts that a haystack contains only values of a given type.
- assertContainsOnlyInstancesOf() — Asserts that a haystack contains only instances of a given classname
- assertCount() — Asserts the number of elements of an array, Countable or Traversable.
- assertEmpty() — Asserts that a variable is empty.
- assertEqualXMLStructure() — Asserts that a hierarchy of DOMElements matches.
- assertEquals() — Asserts that two variables are equal.
- assertFalse() — Asserts that a condition is false.
- assertFileEquals() — Asserts that the contents of one file is equal to the contents of another file.
- assertFileExists() — Asserts that a file exists.
- assertFileNotEquals() — Asserts that the contents of one file is not equal to the contents of another file.
- assertFileNotExists() — Asserts that a file does not exist.
- assertGreaterThan() — Asserts that a value is greater than another value.
- assertGreaterThanOrEqual() — Asserts that a value is greater than or equal to another value.
- assertInstanceOf() — Asserts that a variable is of a given type.
- assertInternalType() — Asserts that a variable is of a given type.
- assertJson() — Asserts that a string is a valid JSON string.
- assertJsonFileEqualsJsonFile() — Asserts that two JSON files are equal.
- assertJsonFileNotEqualsJsonFile() — Asserts that two JSON files are not equal.
- assertJsonStringEqualsJsonFile() — Asserts that the generated JSON encoded object and the content of the given file are equal.
- assertJsonStringEqualsJsonString() — Asserts that two given JSON encoded objects or arrays are equal.
- assertJsonStringNotEqualsJsonFile() — Asserts that the generated JSON encoded object and the content of the given file are not equal.
- assertJsonStringNotEqualsJsonString() — Asserts that two given JSON encoded objects or arrays are not equal.
- assertLessThan() — Asserts that a value is smaller than another value.
- assertLessThanOrEqual() — Asserts that a value is smaller than or equal to another value.
- assertNotContains() — Asserts that a haystack does not contain a needle.
- assertNotContainsOnly() — Asserts that a haystack does not contain only values of a given type.
- assertNotCount() — Asserts the number of elements of an array, Countable or Traversable.
- assertNotEmpty() — Asserts that a variable is not empty.
- assertNotEquals() — Asserts that two variables are not equal.
- assertNotFalse() — Asserts that a condition is not false.
- assertNotInstanceOf() — Asserts that a variable is not of a given type.
- assertNotInternalType() — Asserts that a variable is not of a given type.
- assertNotNull() — Asserts that a variable is not null.
- assertNotRegExp() — Asserts that a string does not match a given regular expression.
- assertNotSame() — Asserts that two variables do not have the same type and value.
- assertNotSameSize() — Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same.
- assertNotTag() — This assertion is the exact opposite of assertTag().
- assertNotTrue() — Asserts that a condition is not true.
- assertNull() — Asserts that a variable is null.
- assertObjectHasAttribute() — Asserts that an object has a specified attribute.
- assertObjectNotHasAttribute() — Asserts that an object does not have a specified attribute.
- assertRegExp() — Asserts that a string matches a given regular expression.
- assertSame() — Asserts that two variables have the same type and value.
- assertSameSize() — Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same.
- assertSelectCount() — Assert the presence, absence, or count of elements in a document matching the CSS $selector, regardless of the contents of those elements.
- assertSelectEquals() — assertSelectEquals("#binder .name", "Chuck", true, $xml); // any? assertSelectEquals("#binder .name", "Chuck", false, $xml); // none?
- assertSelectRegExp() — assertSelectRegExp("#binder .name", "/Mike|Derek/", true, $xml); // any? assertSelectRegExp("#binder .name", "/Mike|Derek/", 3, $xml); // 3?
- assertStringEndsNotWith() — Asserts that a string ends not with a given suffix.
- assertStringEndsWith() — Asserts that a string ends with a given suffix.
- assertStringEqualsFile() — Asserts that the contents of a string is equal to the contents of a file.
- assertStringMatchesFormat() — Asserts that a string matches a given format string.
- assertStringMatchesFormatFile() — Asserts that a string matches a given format file.
- assertStringNotEqualsFile() — Asserts that the contents of a string is not equal to the contents of a file.
- assertStringNotMatchesFormat() — Asserts that a string does not match a given format string.
- assertStringNotMatchesFormatFile() — Asserts that a string does not match a given format string.
- assertStringStartsNotWith() — Asserts that a string starts not with a given prefix.
- assertStringStartsWith() — Asserts that a string starts with a given prefix.
- assertTag() — Evaluate an HTML or XML string and assert its structure and/or contents.
- assertThat() — Evaluates a PHPUnit_Framework_Constraint matcher object.
- assertTrue() — Asserts that a condition is true.
- assertXmlFileEqualsXmlFile() — Asserts that two XML files are equal.
- assertXmlFileNotEqualsXmlFile() — Asserts that two XML files are not equal.
- assertXmlStringEqualsXmlFile() — Asserts that two XML documents are equal.
- assertXmlStringEqualsXmlString() — Asserts that two XML documents are equal.
- assertXmlStringNotEqualsXmlFile() — Asserts that two XML documents are not equal.
- assertXmlStringNotEqualsXmlString() — Asserts that two XML documents are not equal.
- attribute() — Returns a PHPUnit_Framework_Constraint_Attribute matcher object.
- attributeEqualTo() — Returns a PHPUnit_Framework_Constraint_IsEqual matcher object that is wrapped in a PHPUnit_Framework_Constraint_Attribute matcher object.
- callback() — Returns a PHPUnit_Framework_Constraint_Callback matcher object.
- classHasAttribute() — Returns a PHPUnit_Framework_Constraint_ClassHasAttribute matcher object.
- classHasStaticAttribute() — Returns a PHPUnit_Framework_Constraint_ClassHasStaticAttribute matcher object.
- contains() — Returns a PHPUnit_Framework_Constraint_TraversableContains matcher object.
- containsOnly() — Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher object.
- containsOnlyInstancesOf() — Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher object.
- countOf() — Returns a PHPUnit_Framework_Constraint_Count matcher object.
- equalTo() — Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.
- fail() — Fails a test with the given message.
- fileExists() — Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
- getCount() — Return the current assertion count.
- getObjectAttribute() — Returns the value of an object's attribute.
- getStaticAttribute() — Returns the value of a static attribute.
- greaterThan() — Returns a PHPUnit_Framework_Constraint_GreaterThan matcher object.
- greaterThanOrEqual() — Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_GreaterThan matcher object.
- identicalTo() — Returns a PHPUnit_Framework_Constraint_IsIdentical matcher object.
- isEmpty() — Returns a PHPUnit_Framework_Constraint_IsEmpty matcher object.
- isFalse() — Returns a PHPUnit_Framework_Constraint_IsFalse matcher object.
- isInstanceOf() — Returns a PHPUnit_Framework_Constraint_IsInstanceOf matcher object.
- isJson() — Returns a PHPUnit_Framework_Constraint_IsJson matcher object.
- isNull() — Returns a PHPUnit_Framework_Constraint_IsNull matcher object.
- isTrue() — Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
- isType() — Returns a PHPUnit_Framework_Constraint_IsType matcher object.
- lessThan() — Returns a PHPUnit_Framework_Constraint_LessThan matcher object.
- lessThanOrEqual() — Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_LessThan matcher object.
- logicalAnd() — Returns a PHPUnit_Framework_Constraint_And matcher object.
- logicalNot() — Returns a PHPUnit_Framework_Constraint_Not matcher object.
- logicalOr() — Returns a PHPUnit_Framework_Constraint_Or matcher object.
- logicalXor() — Returns a PHPUnit_Framework_Constraint_Xor matcher object.
- markTestIncomplete() — Mark the test as incomplete.
- markTestSkipped() — Mark the test as skipped.
- matches() — Returns a PHPUnit_Framework_Constraint_StringMatches matcher object.
- matchesRegularExpression() — Returns a PHPUnit_Framework_Constraint_PCREMatch matcher object.
- objectHasAttribute() — Returns a PHPUnit_Framework_Constraint_ObjectHasAttribute matcher object.
- readAttribute() — Returns the value of an attribute of a class or an object.
- resetCount() — Reset the assertion counter.
- stringContains() — Returns a PHPUnit_Framework_Constraint_StringContains matcher object.
- stringEndsWith() — Returns a PHPUnit_Framework_Constraint_StringEndsWith matcher object.
- stringStartsWith() — Returns a PHPUnit_Framework_Constraint_StringStartsWith matcher object.
History
-
2014-08-17T09:59:50+02:00 (commit #f40b290)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix @since annotations
-
2014-08-12T07:25:32+02:00 (commit #55caa21)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix CS/WS issues
-
2014-08-12T06:43:31+02:00 (commit #50dfaba)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
phpcbf --standard=PSR2 src tests
-
2014-08-02T01:43:22+02:00 (commit #c7cde96)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Use a better variable name.
-
2014-08-02T00:20:34+02:00 (commit #427eb1f)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Fixes #1374: tearDown() is called despite unmet requirements.
-
2014-07-28T21:10:22+02:00 (commit #38231aa)
Author: sun (sun@unleashedmind.com) / Commiter: sun (sun@unleashedmind.com)
Fix #797: Disabled $preserveGlobalState does not load bootstrap.php in process isolation.
-
2014-07-27T23:05:20+02:00 (commit #c85fcdc)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Clean up #1358.
-
2014-07-27T20:06:31+02:00 (commit #6b308c3)
Author: sun (sun@unleashedmind.com) / Commiter: sun (sun@unleashedmind.com)
Allow a test to identify whether it runs in isolation. A custom setup of test fixtures may use this indicator to skip additional performance optimizations that only make sense if multiple tests are executed in the same process.
-
2014-07-27T08:05:00+02:00 (commit #fc9c6dc)
Author: Márcio Almada (marcio3w@gmail.com) / Commiter: Márcio Almada (marcio3w@gmail.com)
make TestCase aware of @expectedExceptionMessageRegExp and Constraint\ExceptionMessageRegExp
-
2014-07-27T07:55:48+02:00 (commit #2b37a6a)
Author: Márcio Almada (marcio3w@gmail.com) / Commiter: Márcio Almada (marcio3w@gmail.com)
add implementation for TestCase::setExpectedExceptionRegExp api
-
2014-07-22T10:14:19+02:00 (commit #d42fdc0)
Author: Dominik del Bondio (dominik.del.bondio@bitextender.com) / Commiter: Dominik del Bondio (dominik.del.bondio@bitextender.com)
Fix tests failing with weird names and test isolation
-
2014-07-07T13:27:34+02:00 (commit #18852ac)
Author: Eugene Leonovich (gen.work@gmail.com) / Commiter: Eugene Leonovich (gen.work@gmail.com)
Check both the function and the method for the existence via '@requires function' annotation
-
2014-07-03T11:17:31+02:00 (commit #46effd5)
Author: Evgeniy Makhrov (emakhrov@gmail.com) / Commiter: Evgeniy Makhrov (emakhrov@gmail.com)
Fix dependencyInput count in case of repeated test Always use the latest result of dependency
-
2014-06-16T09:44:27+02:00 (commit #d76ecfc)
Author: Eugene Leonovich (gen.work@gmail.com) / Commiter: Eugene Leonovich (gen.work@gmail.com)
Fix formatting
-
2014-06-16T09:25:19+02:00 (commit #b006343)
Author: Eugene Leonovich (gen.work@gmail.com) / Commiter: Eugene Leonovich (gen.work@gmail.com)
Tweak PHPUnit_Util_Test::getMissingRequirements() introduced in #1289
-
2014-06-15T18:41:38+02:00 (commit #168ac2b)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Formatting.
-
2014-06-13T09:18:02+02:00 (commit #df44046)
Author: Eugene Leonovich (gen.work@gmail.com) / Commiter: Eugene Leonovich (gen.work@gmail.com)
Remove PHPUnit_Util_Test::setRequirementsFromAnnotation()
-
2014-06-12T16:52:35+02:00 (commit #ee1da98)
Author: Eugene Leonovich (gen.work@gmail.com) / Commiter: Eugene Leonovich (gen.work@gmail.com)
Check requirements before "beforeClass" calls in a TestSuite
-
2014-05-27T08:56:24+02:00 (commit #461607a)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Mark a test as risky when either the test code or the tested code does not (or does not only) close output buffers it has started
-
2014-05-02T02:46:42+02:00 (commit #b507a71)
Author: jeroendedauw (jeroendedauw@gmail.com) / Commiter: jeroendedauw (jeroendedauw@gmail.com)
Fix error in doc and make it more clear The mentioned parameter was no longer last :) The default behaviour with regard to mocking concrete methods is unexpected, at least to me. So I changed the doc to mention it more explicitly.
-
2014-04-26T08:27:42+02:00 (commit #efdfca6)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
PHPUnit_MockObject 2.0 and up do not have __phpunit_cleanup() anymore
-
2014-04-22T12:28:46+02:00 (commit #d20d40f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Make PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount and PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount accessible
-
2014-04-20T10:44:50+02:00 (commit #a8aa89e)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Refinement of 560c99abb8b7db7f5d7ca72653126134c97b3ac1
-
2014-04-18T18:54:55+02:00 (commit #560c99a)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Mark a test as risky when its method is annotated with @todo
-
2014-03-15T11:32:48+01:00 (commit #32a5795)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Refactor the handling of the @beforeClass, @before, @after, @afterClass annotations to close #1186 and probably solve other issues (in process isolation, for instance)
-
2014-03-07T14:53:32+01:00 (commit #92f463d)
Author: Christopher Davis (cdavis9999@gmail.com) / Commiter: Christopher Davis (cdavis9999@gmail.com)
Lazily Create Mock Object Generator Fixes #1164 Instead of setting up the mock object generator in TestCase's constructor, it's created whenever a call to `getMockObjectGenerator` is made.
-
2014-02-14T18:31:32+01:00 (commit #e5b50bc)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Next version will be 4.0
-
2014-01-28T19:06:49+01:00 (commit #4c047ce)
Author: Markus Staab (markus.staab@redaxo.de) / Commiter: Jeff Welch (markus.staab@redaxo.de)
added @since phpdoc for hasDependencies
-
2014-01-28T19:02:23+01:00 (commit #13f77b7)
Author: Lars Strojny (lars@strojny.net) / Commiter: Jeff Welch (lars@strojny.net)
Adding a few mutators
-
2014-01-28T17:00:42+01:00 (commit #dfab5de)
Author: Markus Staab (markus.staab@redaxo.de) / Commiter: Markus Staab (markus.staab@redaxo.de)
added @since phpdoc for hasDependencies
-
2014-01-22T19:43:07+01:00 (commit #02b42d7)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Initial work on formatting code according to PSR-2
-
2014-01-20T17:21:13+01:00 (commit #3a5808f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Cleanup
-
2014-01-18T11:52:34+01:00 (commit #db5adbb)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Initial work on #1101
-
2014-01-18T11:44:56+01:00 (commit #e8a966b)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Refactor PHPUnit_Util_PHP
-
2014-01-12T01:26:16+01:00 (commit #af5610d)
Author: Lars Strojny (lars@strojny.net) / Commiter: Lars Strojny (lars@strojny.net)
Adding a few mutators
-
2014-01-09T08:11:47+01:00 (commit #205e008)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year
-
2014-01-05T12:03:59+01:00 (commit #9101f51)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Closes #914
-
2014-01-02T20:30:36+01:00 (commit #feef5c9)
Author: Eugene Leonovich (gen.work@gmail.com) / Commiter: Eugene Leonovich (gen.work@gmail.com)
Check the requirements before setUpBeforeClass()
-
2013-12-31T10:10:55+01:00 (commit #4b2391e)
Author: Eugene Leonovich (gen.work@gmail.com) / Commiter: Eugene Leonovich (gen.work@gmail.com)
Check the requirements before calling the setUp()
-
2013-12-06T15:23:00+01:00 (commit #ffb5bb8)
Author: Matthieu Napoli (matthieu@mnapoli.fr) / Commiter: Matthieu Napoli (matthieu@mnapoli.fr)
Added phpdoc for TestCase::getMock Texts inspired from the doc: http://phpunit.de/manual/3.7/en/test-doubles.html
-
2013-11-03T18:41:44+01:00 (commit #ea9d518)
Author: Jan Pieper (kontakt@jan-pieper.info) / Commiter: Jan Pieper (kontakt@jan-pieper.info)
corrected return type from string to boolean
-
2013-09-25T13:27:08+02:00 (commit #ed0eac7)
Author: Hans-Peter Buniat (hpbuniat@gmail.com) / Commiter: Hans-Peter Buniat (hpbuniat@gmail.com)
less memory-consuming way to determine array-recursions
-
2013-09-04T06:29:36+02:00 (commit #c07b181)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Fixes #991 Removed: * `@outputBuffering` * `PHPUnit_Framework_TestCase::setUseOutputBuffering()` * `PHPUnit_Util_Test::getOutputBufferingSettings()`
-
2013-08-09T08:55:12+02:00 (commit #fbd4d58)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Closes #982
-
2013-07-10T10:10:20+02:00 (commit #79d0d71)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Required change for https://github.com/sebastianbergmann/phpunit-mock-objects/issues/132
-
2013-07-09T18:10:38+02:00 (commit #d1efb51)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Sync with https://github.com/sebastianbergmann/phpunit-mock-objects/commit/ee8b777e0a0aea24856089fe4e83f9d7be4bac6d
-
2013-05-22T18:26:25+02:00 (commit #a2903c3)
Author: Dave Hulbert (dave1010@gmail.com) / Commiter: Dave Hulbert (dave1010@gmail.com)
Make TestCase::hasOutput() return true if "0" is outputted TestCase::hasOutput() returns false when "0" is outputted, as it uses empty(), which returns false on the string "0".
-
2013-04-25T11:15:18+02:00 (commit #3a62659)
Author: Giorgio Sironi (info@giorgiosironi.com) / Commiter: Giorgio Sironi (info@giorgiosironi.com)
Making setUp() and tearDown() part of the new design
-
2013-04-25T11:13:18+02:00 (commit #8a7c496)
Author: Giorgio Sironi (info@giorgiosironi.com) / Commiter: Giorgio Sironi (info@giorgiosironi.com)
Added support for @before and @after
-
2013-04-25T10:35:41+02:00 (commit #09ce333)
Author: Giorgio Sironi (info@giorgiosironi.com) / Commiter: Giorgio Sironi (info@giorgiosironi.com)
Failing test, with hack to make it pass
-
2013-03-09T11:18:09+01:00 (commit #cf444ca)
Author: Adam Lynch (contact@adamlynch.ie) / Commiter: Adam Lynch (contact@adamlynch.ie)
Fixed some PHPDoc block mistakes
-
2013-03-08T12:30:34+01:00 (commit #8c3ef88)
Author: Alistair Stead (alistair.stead@designdisclosure.com) / Commiter: Alistair Stead (alistair.stead@designdisclosure.com)
Added $options array to TestCase::getMockFromWsdl Summary: So that the SOAPClient is created with the appropriate options and additional parameter has been added to getMockFromWsdl and passed through to the MockObject_Generator. This is required if your create a mock method for __doRequest and pass a complex xml string. If you do not have the option to set client options it can result in different interpretation of objects and arrays by the SOAPClient.
-
2013-03-06T04:13:36+01:00 (commit #d2fac98)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Slight improvement to b9ea952.
-
2013-03-05T22:33:11+01:00 (commit #6755f06)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Merge branch '3.7'
-
2013-03-05T22:27:27+01:00 (commit #b9ea952)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Made #844 work for isolated tests.
-
2013-02-21T07:01:38+01:00 (commit #2d5f2a1)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Fixes #834 * Added the `@requires OS` annotation.
-
2013-01-25T09:14:14+01:00 (commit #21f620f)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Fixes #789 * Maintain INI values during process isolation.
-
2013-01-10T05:11:46+01:00 (commit #98deae1)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Implemented trait mocking.
-
2013-01-07T11:37:52+01:00 (commit #c517984)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year
-
2013-01-07T05:45:48+01:00 (commit #6567f5f)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Fixes GH-765 * Fixed fatal error triggered in PHPUnit when exception is thrown in data provider of a test with a dependency.
-
2012-11-14T12:54:09+01:00 (commit #834d99b)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
PHPUnit_Framework_MockObject_Generator is non-static now.
-
2012-09-24T06:47:44+02:00 (commit #81ab540)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Do not perform string replacement for @package_version@ anymore.
-
2012-09-20T08:37:13+02:00 (commit #e46f1f1)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Always clean up mock objects (and free up memory). Closes #656.
-
2012-08-31T17:00:07+02:00 (commit #d823110)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Disable argument cloning in mocked method calls by default.
-
2012-08-03T11:18:58+02:00 (commit #7ad1809)
Author: Fabien Potencier (fabien.potencier@gmail.com) / Commiter: Fabien Potencier (fabien.potencier@gmail.com)
Fix data serialization when using process isolation (closes #614)
-
2012-05-26T18:09:06+02:00 (commit #ae04661)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Revert 01e5c980 from #561. The way the exception message is shown is not making it clear to the user what is shown
-
2012-05-03T11:48:58+02:00 (commit #01e5c98)
Author: Philipp Scheit (p.scheit@ps-webforge.com) / Commiter: Philipp Scheit (p.scheit@ps-webforge.com)
TestCase::runTest more verbose expectedException assertion message when expectedExceptionMessage is not checked ConfigurationTest::testPHPConfigurationIsReadCorrectly use directory_seperator for testing the path on windows
-
2012-04-30T12:02:38+02:00 (commit #5786e50)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
List The BSD 3-Clause License correctly and consistently. Thanks to Christian Aistleitner <christian@quelltextlich.at> for bringing this issue to my attention.
-
2012-03-24T12:38:48+01:00 (commit #1d723d0)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Closes phpunit-mock-object 83: getMockFromWsdl didn't work twice with the same wsdl file
-
2012-02-19T00:12:02+01:00 (commit #22a704d)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Refactored and expanded @requires to allow for checking multiple functions and extensions using the annotation
-
2012-01-31T08:06:42+01:00 (commit #4e5fbcb)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Add API to make cloning of arguments passed to mocked methods optional.
-
2012-01-19T23:05:45+01:00 (commit #64788f3)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Closes #463.
-
2012-01-19T08:09:49+01:00 (commit #6acd28e)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix reflection errors when PHPUnit_Framework_Warning is used.
-
2012-01-01T11:21:16+01:00 (commit #aae6c38)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2011-12-27T19:19:05+01:00 (commit #f9f4662)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Eliminate dead code.
-
2011-12-27T10:52:44+01:00 (commit #19e6891)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Support expecting the generic Exception again.
-
2011-12-27T10:21:52+01:00 (commit #37cacc9)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
PHPUnit no longer throws exceptions that do not extend PHPUnit_Framework_Exception.
-
2011-12-22T18:51:23+01:00 (commit #4bf0f7c)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Even more work on failure messages for expected exceptions.
-
2011-12-21T11:51:53+01:00 (commit #370f00e)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Improve failure messages for exception expectations.
-
2011-12-20T14:28:44+01:00 (commit #af0bdd6)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Fixes #445: Expecting output in strict mode didn't work because hasOutput() returned that the test had generated outed, that output was then printed and the strict requirement that no output should be generated failed. Adapted hasOutput() to include the flag that shows off if output has already been generated and asserted against.
-
2011-12-20T12:07:08+01:00 (commit #32f1eb0)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Revert "Improve error message for exception code mismatch." This reverts commit ba09f2115bdcacab10ea855624eab02a464dc9c4.
-
2011-12-20T11:28:29+01:00 (commit #ba09f21)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Improve error message for exception code mismatch.
-
2011-12-20T10:22:06+01:00 (commit #a98b766)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Expected exception code may now be 0.
-
2011-12-16T17:33:30+01:00 (commit #d368bf8)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Fix phpcs
-
2011-12-15T10:34:49+01:00 (commit #7a2e6e4)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Fixes #420: Output buffering is now stopped unconditionally as it is also started unconditionally with 3.6
-
2011-12-14T22:13:12+01:00 (commit #01b6af3)
Author: David Zuelke (david.zuelke@bitextender.com) / Commiter: David Zuelke (david.zuelke@bitextender.com)
Use var_export() instead of addcslashes() on serialized/generated data for process isolation - addcslashes() screws up null byte escape sequences, which causes PHP to crash with garbage output - thou shalt not mutate thy serialize() output.
-
2011-12-13T13:09:23+01:00 (commit #11b9153)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Fixes #433 for failing tests that expect output to be produced
-
2011-12-12T17:34:49+01:00 (commit #29a481c)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Fix phpcs issues
-
2011-12-12T17:24:27+01:00 (commit #e4fb303)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Fixes #433. Don't print generated output when expectations are performed on it
-
2011-12-05T12:18:34+01:00 (commit #025dd36)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
sed -i 's#dirname(__FILE__)#__DIR__#gi' **/*.php
-
2011-11-17T09:40:23+01:00 (commit #87b0b82)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix PHPUnit_Framework_TestCase::hasOutput().
-
2011-11-11T20:36:21+01:00 (commit #518f30c)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Fix whitespace issue
-
2011-11-11T12:30:41+01:00 (commit #81af17c)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Restore current working directory if changed by a test case. Closes #207
-
2011-11-10T19:57:54+01:00 (commit #bcf5245)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Fixes #244 by allowing string exception codes
-
2011-11-08T09:52:35+01:00 (commit #9c9bdcb)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Eliminate version_compare() calls.
-
2011-10-24T11:10:38+02:00 (commit #2134d11)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Delay the call to setExpectedExceptionFromAnnotation() until we are in the test context and the InvalidArgumentException can be caught by the test runner.
-
2011-10-24T09:44:47+02:00 (commit #ecfbc21)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Also trigger error for \Exception.
-
2011-10-07T08:47:14+02:00 (commit #8806681)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Closes #371.
-
2011-10-07T07:53:18+02:00 (commit #cd4cea9)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Add PHPUnit_Framework_TestCase::setTestResultObject().
-
2011-10-07T07:48:46+02:00 (commit #f44f925)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix whitespace.
-
2011-09-27T11:29:02+02:00 (commit #e87ed5f)
Author: Nick Payne (nick@kurai.co.uk) / Commiter: Nick Payne (nick@kurai.co.uk)
allow concrete methods of abstract classes to be mocked