Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CompoundConstraintTestCase.php

class CompoundConstraintTestCase

A test case to ease testing Compound Constraints.

@author Alexandre Daubois <alex.daubois@gmail.com>

@template T of Compound

Hierarchy

  • class \PHPUnit\Framework\Assert
    • class \PHPUnit\Framework\TestCase extends \PHPUnit\Framework\Assert implements \PHPUnit\Framework\Reorderable, \PHPUnit\Framework\SelfDescribing, \PHPUnit\Framework\Test
      • class \Symfony\Component\Validator\Test\CompoundConstraintTestCase extends \PHPUnit\Framework\TestCase

Expanded class hierarchy of CompoundConstraintTestCase

File

vendor/symfony/validator/Test/CompoundConstraintTestCase.php, line 33

Namespace

Symfony\Component\Validator\Test
View source
abstract class CompoundConstraintTestCase extends TestCase {
    protected ValidatorInterface $validator;
    protected ?ConstraintViolationListInterface $violationList = null;
    protected ExecutionContextInterface $context;
    protected string $root;
    private mixed $validatedValue;
    protected function setUp() : void {
        $this->root = 'root';
        $this->validator = $this->createValidator();
        $this->context = $this->createContext($this->validator);
    }
    protected function validateValue(mixed $value) : void {
        $this->validator
            ->inContext($this->context)
            ->validate($this->validatedValue = $value, $this->createCompound());
    }
    protected function createValidator() : ValidatorInterface {
        return Validation::createValidator();
    }
    protected function createContext(?ValidatorInterface $validator = null) : ExecutionContextInterface {
        $translator = $this->createMock(TranslatorInterface::class);
        $translator->expects($this->any())
            ->method('trans')
            ->willReturnArgument(0);
        return new ExecutionContext($validator ?? $this->createValidator(), $this->root, $translator);
    }
    public function assertViolationsRaisedByCompound(Constraint|array $constraints) : void {
        if ($constraints instanceof Constraint) {
            $constraints = [
                $constraints,
            ];
        }
        $validator = new CompoundValidator();
        $context = $this->createContext();
        $validator->initialize($context);
        $validator->validate($this->validatedValue, new class ($constraints) extends Compound {
            public function __construct(array $testedConstraints) {
                parent::__construct();
            }
            protected function getConstraints(array $options) : array {
                return $this->testedConstraints;
            }

});
        $expectedViolations = iterator_to_array($context->getViolations());
        if (!$expectedViolations) {
            throw new ExpectationFailedException(\sprintf('Expected at least one violation for constraint(s) "%s", got none raised.', implode(', ', array_map(fn($constraint) => $constraint::class, $constraints))));
        }
        $failedToAssertViolations = [];
        reset($expectedViolations);
        foreach ($this->context
            ->getViolations() as $violation) {
            if ($violation != current($expectedViolations)) {
                $failedToAssertViolations[] = $violation;
            }
            next($expectedViolations);
        }
        $this->assertEmpty($failedToAssertViolations, \sprintf('Expected violation(s) for constraint(s) %s to be raised by compound.', implode(', ', array_map(fn($violation) => $violation->getConstraint()::class, $failedToAssertViolations))));
    }
    public function assertViolationsCount(int $count) : void {
        $this->assertCount($count, $this->context
            ->getViolations());
    }
    protected function assertNoViolation() : void {
        $violationsCount = \count($this->context
            ->getViolations());
        $this->assertSame(0, $violationsCount, \sprintf('No violation expected. Got %d.', $violationsCount));
    }
    
    /**
     * @return T
     */
    protected abstract function createCompound() : Compound;

}

Members

Title Sort descending Deprecated Modifiers Object type Summary Overriden Title Overrides
Assert::$count private static property
Assert::anything final public static function
Assert::arrayHasKey final public static function
Assert::assertArrayHasKey final public static function Asserts that an array has a specified key.
Assert::assertArrayNotHasKey final public static function Asserts that an array does not have a specified key.
Assert::assertContains final public static function Asserts that a haystack contains a needle.
Assert::assertContainsEquals final public static function
Assert::assertContainsOnly final public static function Asserts that a haystack contains only values of a given type.
Assert::assertContainsOnlyInstancesOf final public static function Asserts that a haystack contains only instances of a given class name.
Assert::assertCount final public static function Asserts the number of elements of an array, Countable or Traversable.
Assert::assertDirectoryDoesNotExist final public static function Asserts that a directory does not exist.
Assert::assertDirectoryExists final public static function Asserts that a directory exists.
Assert::assertDirectoryIsNotReadable final public static function Asserts that a directory exists and is not readable.
Assert::assertDirectoryIsNotWritable final public static function Asserts that a directory exists and is not writable.
Assert::assertDirectoryIsReadable final public static function Asserts that a directory exists and is readable.
Assert::assertDirectoryIsWritable final public static function Asserts that a directory exists and is writable.
Assert::assertDoesNotMatchRegularExpression final public static function Asserts that a string does not match a given regular expression.
Assert::assertEmpty final public static function Asserts that a variable is empty.
Assert::assertEquals final public static function Asserts that two variables are equal.
Assert::assertEqualsCanonicalizing final public static function Asserts that two variables are equal (canonicalizing).
Assert::assertEqualsIgnoringCase final public static function Asserts that two variables are equal (ignoring case).
Assert::assertEqualsWithDelta final public static function Asserts that two variables are equal (with delta).
Assert::assertFalse final public static function Asserts that a condition is false.
Assert::assertFileDoesNotExist final public static function Asserts that a file does not exist.
Assert::assertFileEquals final public static function Asserts that the contents of one file is equal to the contents of another
file.
Assert::assertFileEqualsCanonicalizing final public static function Asserts that the contents of one file is equal to the contents of another
file (canonicalizing).
Assert::assertFileEqualsIgnoringCase final public static function Asserts that the contents of one file is equal to the contents of another
file (ignoring case).
Assert::assertFileExists final public static function Asserts that a file exists.
Assert::assertFileIsNotReadable final public static function Asserts that a file exists and is not readable.
Assert::assertFileIsNotWritable final public static function Asserts that a file exists and is not writable.
Assert::assertFileIsReadable final public static function Asserts that a file exists and is readable.
Assert::assertFileIsWritable final public static function Asserts that a file exists and is writable.
Assert::assertFileMatchesFormat final public static function Asserts that a string matches a given format string.
Assert::assertFileMatchesFormatFile final public static function Asserts that a string matches a given format string.
Assert::assertFileNotEquals final public static function Asserts that the contents of one file is not equal to the contents of
another file.
Assert::assertFileNotEqualsCanonicalizing final public static function Asserts that the contents of one file is not equal to the contents of another
file (canonicalizing).
Assert::assertFileNotEqualsIgnoringCase final public static function Asserts that the contents of one file is not equal to the contents of another
file (ignoring case).
Assert::assertFinite final public static function Asserts that a variable is finite.
Assert::assertGreaterThan final public static function Asserts that a value is greater than another value.
Assert::assertGreaterThanOrEqual final public static function Asserts that a value is greater than or equal to another value.
Assert::assertInfinite final public static function Asserts that a variable is infinite.
Assert::assertInstanceOf final public static function Asserts that a variable is of a given type.
Assert::assertIsArray final public static function Asserts that a variable is of type array.
Assert::assertIsBool final public static function Asserts that a variable is of type bool.
Assert::assertIsCallable final public static function Asserts that a variable is of type callable.
Assert::assertIsClosedResource final public static function Asserts that a variable is of type resource and is closed.
Assert::assertIsFloat final public static function Asserts that a variable is of type float.
Assert::assertIsInt final public static function Asserts that a variable is of type int.
Assert::assertIsIterable final public static function Asserts that a variable is of type iterable.
Assert::assertIsList final public static function
Assert::assertIsNotArray final public static function Asserts that a variable is not of type array.
Assert::assertIsNotBool final public static function Asserts that a variable is not of type bool.
Assert::assertIsNotCallable final public static function Asserts that a variable is not of type callable.
Assert::assertIsNotClosedResource final public static function Asserts that a variable is not of type resource.
Assert::assertIsNotFloat final public static function Asserts that a variable is not of type float.
Assert::assertIsNotInt final public static function Asserts that a variable is not of type int.
Assert::assertIsNotIterable final public static function Asserts that a variable is not of type iterable.
Assert::assertIsNotNumeric final public static function Asserts that a variable is not of type numeric.
Assert::assertIsNotObject final public static function Asserts that a variable is not of type object.
Assert::assertIsNotReadable final public static function Asserts that a file/dir exists and is not readable.
Assert::assertIsNotResource final public static function Asserts that a variable is not of type resource.
Assert::assertIsNotScalar final public static function Asserts that a variable is not of type scalar.
Assert::assertIsNotString final public static function Asserts that a variable is not of type string.
Assert::assertIsNotWritable final public static function Asserts that a file/dir exists and is not writable.
Assert::assertIsNumeric final public static function Asserts that a variable is of type numeric.
Assert::assertIsObject final public static function Asserts that a variable is of type object.
Assert::assertIsReadable final public static function Asserts that a file/dir is readable.
Assert::assertIsResource final public static function Asserts that a variable is of type resource.
Assert::assertIsScalar final public static function Asserts that a variable is of type scalar.
Assert::assertIsString final public static function Asserts that a variable is of type string.
Assert::assertIsWritable final public static function Asserts that a file/dir exists and is writable.
Assert::assertJson final public static function Asserts that a string is a valid JSON string.
Assert::assertJsonFileEqualsJsonFile final public static function Asserts that two JSON files are equal.
Assert::assertJsonFileNotEqualsJsonFile final public static function Asserts that two JSON files are not equal.
Assert::assertJsonStringEqualsJsonFile final public static function Asserts that the generated JSON encoded object and the content of the given file are equal.
Assert::assertJsonStringEqualsJsonString final public static function Asserts that two given JSON encoded objects or arrays are equal.
Assert::assertJsonStringNotEqualsJsonFile final public static function Asserts that the generated JSON encoded object and the content of the given file are not equal.
Assert::assertJsonStringNotEqualsJsonString final public static function Asserts that two given JSON encoded objects or arrays are not equal.
Assert::assertLessThan final public static function Asserts that a value is smaller than another value.
Assert::assertLessThanOrEqual final public static function Asserts that a value is smaller than or equal to another value.
Assert::assertMatchesRegularExpression final public static function Asserts that a string matches a given regular expression.
Assert::assertNan final public static function Asserts that a variable is nan.
Assert::assertNotContains final public static function Asserts that a haystack does not contain a needle.
Assert::assertNotContainsEquals final public static function
Assert::assertNotContainsOnly final public static function Asserts that a haystack does not contain only values of a given type.
Assert::assertNotCount final public static function Asserts the number of elements of an array, Countable or Traversable.
Assert::assertNotEmpty final public static function Asserts that a variable is not empty.
Assert::assertNotEquals final public static function Asserts that two variables are not equal.
Assert::assertNotEqualsCanonicalizing final public static function Asserts that two variables are not equal (canonicalizing).
Assert::assertNotEqualsIgnoringCase final public static function Asserts that two variables are not equal (ignoring case).
Assert::assertNotEqualsWithDelta final public static function Asserts that two variables are not equal (with delta).
Assert::assertNotFalse final public static function Asserts that a condition is not false.
Assert::assertNotInstanceOf final public static function Asserts that a variable is not of a given type.
Assert::assertNotNull final public static function Asserts that a variable is not null.
Assert::assertNotSame final public static function Asserts that two variables do not have the same type and value.
Used on objects, it asserts that two variables do not reference
the same object.
Assert::assertNotSameSize final public static function Assert that the size of two arrays (or `Countable` or `Traversable` objects)
is not the same.
Assert::assertNotTrue final public static function Asserts that a condition is not true.
Assert::assertNull final public static function Asserts that a variable is null.
Assert::assertObjectEquals final public static function
Assert::assertObjectHasProperty final public static function Asserts that an object has a specified property.
Assert::assertObjectNotHasProperty final public static function Asserts that an object does not have a specified property.
Assert::assertSame final public static function Asserts that two variables have the same type and value.
Used on objects, it asserts that two variables reference
the same object.
Assert::assertSameSize final public static function Assert that the size of two arrays (or `Countable` or `Traversable` objects)
is the same.
Assert::assertStringContainsString final public static function
Assert::assertStringContainsStringIgnoringCase final public static function
Assert::assertStringContainsStringIgnoringLineEndings final public static function
Assert::assertStringEndsNotWith final public static function Asserts that a string ends not with a given suffix.
Assert::assertStringEndsWith final public static function Asserts that a string ends with a given suffix.
Assert::assertStringEqualsFile final public static function Asserts that the contents of a string is equal
to the contents of a file.
Assert::assertStringEqualsFileCanonicalizing final public static function Asserts that the contents of a string is equal
to the contents of a file (canonicalizing).
Assert::assertStringEqualsFileIgnoringCase final public static function Asserts that the contents of a string is equal
to the contents of a file (ignoring case).
Assert::assertStringEqualsStringIgnoringLineEndings final public static function Asserts that two strings are equal except for line endings.
Assert::assertStringMatchesFormat final public static function Asserts that a string matches a given format string.
Assert::assertStringMatchesFormatFile final public static function Asserts that a string matches a given format file.
Assert::assertStringNotContainsString final public static function
Assert::assertStringNotContainsStringIgnoringCase final public static function
Assert::assertStringNotEqualsFile final public static function Asserts that the contents of a string is not equal
to the contents of a file.
Assert::assertStringNotEqualsFileCanonicalizing final public static function Asserts that the contents of a string is not equal
to the contents of a file (canonicalizing).
Assert::assertStringNotEqualsFileIgnoringCase final public static function Asserts that the contents of a string is not equal
to the contents of a file (ignoring case).
Assert::assertStringNotMatchesFormat Deprecated final public static function Asserts that a string does not match a given format string.
Assert::assertStringNotMatchesFormatFile Deprecated final public static function Asserts that a string does not match a given format string.
Assert::assertStringStartsNotWith final public static function Asserts that a string starts not with a given prefix.
Assert::assertStringStartsWith final public static function Asserts that a string starts with a given prefix.
Assert::assertThat final public static function Evaluates a PHPUnit\Framework\Constraint matcher object.
Assert::assertTrue final public static function Asserts that a condition is true.
Assert::assertXmlFileEqualsXmlFile final public static function Asserts that two XML files are equal.
Assert::assertXmlFileNotEqualsXmlFile final public static function Asserts that two XML files are not equal.
Assert::assertXmlStringEqualsXmlFile final public static function Asserts that two XML documents are equal.
Assert::assertXmlStringEqualsXmlString final public static function Asserts that two XML documents are equal.
Assert::assertXmlStringNotEqualsXmlFile final public static function Asserts that two XML documents are not equal.
Assert::assertXmlStringNotEqualsXmlString final public static function Asserts that two XML documents are not equal.
Assert::callback final public static function @psalm-template CallbackInput of mixed
Assert::containsEqual final public static function
Assert::containsIdentical final public static function
Assert::containsOnly final public static function
Assert::containsOnlyInstancesOf final public static function
Assert::countOf final public static function
Assert::directoryExists final public static function
Assert::equalTo final public static function
Assert::equalToCanonicalizing final public static function
Assert::equalToIgnoringCase final public static function
Assert::equalToWithDelta final public static function
Assert::fail final public static function Fails a test with the given message.
Assert::fileExists final public static function
Assert::getCount final public static function Return the current assertion count.
Assert::greaterThan final public static function
Assert::greaterThanOrEqual final public static function
Assert::identicalTo final public static function
Assert::isEmpty final public static function
Assert::isFalse final public static function
Assert::isFinite final public static function
Assert::isInfinite final public static function
Assert::isInstanceOf final public static function
Assert::isJson final public static function
Assert::isList final public static function
Assert::isNan final public static function
Assert::isNativeType private static function
Assert::isNull final public static function
Assert::isReadable final public static function
Assert::isTrue final public static function
Assert::isType final public static function @psalm-param &#039;array&#039;|&#039;boolean&#039;|&#039;bool&#039;|&#039;double&#039;|&#039;float&#039;|&#039;integer&#039;|&#039;int&#039;|&#039;null&#039;|&#039;numeric&#039;|&#039;object&#039;|&#039;real&#039;|&#039;resource&#039;|&#039;resource…
Assert::isWritable final public static function
Assert::lessThan final public static function
Assert::lessThanOrEqual final public static function
Assert::logicalAnd final public static function
Assert::logicalNot final public static function
Assert::logicalOr final public static function
Assert::logicalXor final public static function
Assert::markTestIncomplete final public static function Mark the test as incomplete.
Assert::markTestSkipped final public static function Mark the test as skipped.
Assert::matches final public static function
Assert::matchesRegularExpression final public static function
Assert::objectEquals final public static function
Assert::resetCount final public static function Reset the assertion counter.
Assert::stringContains final public static function
Assert::stringEndsWith final public static function @psalm-param non-empty-string $suffix
Assert::stringEqualsStringIgnoringLineEndings final public static function
Assert::stringStartsWith final public static function @psalm-param non-empty-string $prefix
CompoundConstraintTestCase::$context protected property
CompoundConstraintTestCase::$root protected property
CompoundConstraintTestCase::$validatedValue private property
CompoundConstraintTestCase::$validator protected property
CompoundConstraintTestCase::$violationList protected property
CompoundConstraintTestCase::assertNoViolation protected function
CompoundConstraintTestCase::assertViolationsCount public function
CompoundConstraintTestCase::assertViolationsRaisedByCompound public function
CompoundConstraintTestCase::createCompound abstract protected function
CompoundConstraintTestCase::createContext protected function
CompoundConstraintTestCase::createValidator protected function
CompoundConstraintTestCase::setUp protected function This method is called before each test. Overrides TestCase::setUp
CompoundConstraintTestCase::validateValue protected function
TestCase::$backupGlobals private property
TestCase::$backupGlobalsExcludeList private property @psalm-var list&lt;string&gt;
TestCase::$backupStaticProperties private property
TestCase::$backupStaticPropertiesExcludeList private property @psalm-var array&lt;string,list&lt;class-string&gt;&gt;
TestCase::$customComparators private property @psalm-var list&lt;Comparator&gt;
TestCase::$data private property
TestCase::$dataName private property
TestCase::$dependencies private property @psalm-var list&lt;ExecutionOrderDependency&gt;
TestCase::$dependencyInput private property
TestCase::$doesNotPerformAssertions private property
TestCase::$expectedException private property
TestCase::$expectedExceptionCode private property
TestCase::$expectedExceptionMessage private property
TestCase::$expectedExceptionMessageRegExp private property
TestCase::$failureTypes private property @psalm-var array&lt;class-string, true&gt;
TestCase::$groups private property @psalm-var list&lt;string&gt;
TestCase::$iniSettings private property @psalm-var array&lt;string,string&gt;
TestCase::$inIsolation private property
TestCase::$locale private property
TestCase::$mockObjects private property @psalm-var list&lt;MockObjectInternal&gt;
TestCase::$name private property @psalm-var non-empty-string
TestCase::$numberOfAssertionsPerformed private property
TestCase::$output private property
TestCase::$outputBufferingActive private property
TestCase::$outputBufferingLevel private property
TestCase::$outputExpectedRegex private property
TestCase::$outputExpectedString private property
TestCase::$outputRetrievedForAssertion private property
TestCase::$preserveGlobalState private property
TestCase::$providedTests private property @psalm-var list&lt;ExecutionOrderDependency&gt;
TestCase::$registerMockObjectsFromTestArgumentsRecursively private property
TestCase::$runClassInSeparateProcess private property
TestCase::$runTestInSeparateProcess private property
TestCase::$snapshot private property
TestCase::$status private property
TestCase::$testResult private property
TestCase::$testValueObjectForEvents private property
TestCase::$wasPrepared private property
TestCase::addToAssertionCount final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::any final public static function Returns a matcher that matches when the method is executed
zero or more times.
TestCase::assertPostConditions protected function Performs assertions shared by all tests of a test case.
TestCase::assertPreConditions protected function Performs assertions shared by all tests of a test case.
TestCase::atLeast final public static function Returns a matcher that matches when the method is executed
at least N times.
TestCase::atLeastOnce final public static function Returns a matcher that matches when the method is executed at least once.
TestCase::atMost final public static function Returns a matcher that matches when the method is executed
at most N times.
TestCase::checkRequirements private function
TestCase::cleanupIniSettings private function
TestCase::cleanupLocaleSettings private function
TestCase::compareGlobalStateSnapshotPart private function
TestCase::compareGlobalStateSnapshots private function
TestCase::count final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::createConfiguredMock protected function Creates (and configures) a mock object for the specified interface or class.
TestCase::createConfiguredStub final protected static function Creates (and configures) a test stub for the specified interface or class.
TestCase::createGlobalStateSnapshot private function
TestCase::createMock protected function Creates a mock object for the specified interface or class.
TestCase::createMockForIntersectionOfInterfaces protected function @psalm-param list&lt;class-string&gt; $interfaces
TestCase::createPartialMock protected function Creates a partial mock object for the specified interface or class.
TestCase::createStub protected static function Creates a test stub for the specified interface or class.
TestCase::createStubForIntersectionOfInterfaces protected static function @psalm-param list&lt;class-string&gt; $interfaces
TestCase::createTestProxy Deprecated protected function Creates a test proxy for the specified class.
TestCase::dataName final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::dataSetAsString final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::dataSetAsStringWithData final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::dependencyInput final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::doesNotPerformAssertions final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::exactly final public static function Returns a matcher that matches when the method is executed
exactly $count times.
TestCase::expectedExceptionWasNotRaised private function
TestCase::expectException final public function @psalm-param class-string&lt;Throwable&gt; $exception
TestCase::expectExceptionCode final public function
TestCase::expectExceptionMessage final public function
TestCase::expectExceptionMessageMatches final public function
TestCase::expectExceptionObject final public function Sets up an expectation for an exception to be raised by the code under test.
Information for expected exception class, expected exception message, and
expected exception code are retrieved from a given Exception object.
TestCase::expectNotToPerformAssertions final public function
TestCase::expectOutputRegex final public function
TestCase::expectOutputString final public function
TestCase::expectsOutput final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::getActualOutputForAssertion final public function
TestCase::getMockBuilder final public function Returns a builder object to create mock objects using a fluent interface.
TestCase::getMockForAbstractClass Deprecated protected function Creates a mock object for the specified abstract class with all abstract
methods of the class mocked. Concrete methods are not mocked by default.
To mock concrete methods, use the 7th parameter ($mockedMethods).
TestCase::getMockForTrait Deprecated protected function Creates 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.
TestCase::getMockFromWsdl Deprecated protected function Creates a mock object based on the given WSDL file.
TestCase::getObjectForTrait Deprecated protected function Creates an object that uses the specified trait.
TestCase::groups final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::handleDependencies private function
TestCase::hasDependencyInput final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::hasExpectationOnOutput private function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::hasUnexpectedOutput final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::iniSet Deprecated protected function 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.
TestCase::invokeAfterClassHookMethods private function @codeCoverageIgnore
TestCase::invokeAfterTestHookMethods private function
TestCase::invokeBeforeClassHookMethods private function @codeCoverageIgnore
TestCase::invokeBeforeTestHookMethods private function
TestCase::invokeHookMethods private function @psalm-param list&lt;non-empty-string&gt; $hookMethods
@psalm-param…
TestCase::invokePostConditionHookMethods private function
TestCase::invokePreConditionHookMethods private function
TestCase::isCallableTestMethod private function
TestCase::isRegisteredFailure private function
TestCase::LOCALE_CATEGORIES private constant
TestCase::markErrorForInvalidDependency private function
TestCase::markSkippedForMissingDependency private function
TestCase::methodDoesNotExistOrIsDeclaredInTestCase private function
TestCase::name final public function @psalm-return non-empty-string
TestCase::nameWithDataSet final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::never final public static function Returns a matcher that matches when the method is never executed.
TestCase::numberOfAssertionsPerformed final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::once final public static function Returns a matcher that matches when the method is executed exactly once.
TestCase::onConsecutiveCalls Deprecated final public static function @codeCoverageIgnore
TestCase::onNotSuccessfulTest protected function This method is called when a test method did not execute successfully.
TestCase::output final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::performAssertionsOnOutput private function
TestCase::providedData final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::provides final public function @psalm-return list&lt;ExecutionOrderDependency&gt; Overrides Reorderable::provides
TestCase::registerComparator final protected function
TestCase::registerFailureType final protected function @psalm-param class-string $classOrInterface
TestCase::registerMockObject final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::registerMockObjectsFromTestArguments private function
TestCase::registerMockObjectsFromTestArgumentsRecursively final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::requirementsNotSatisfied private function
TestCase::requires final public function @psalm-return list&lt;ExecutionOrderDependency&gt; Overrides Reorderable::requires
TestCase::restoreGlobalState private function
TestCase::result final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::returnArgument Deprecated final public static function @codeCoverageIgnore
TestCase::returnCallback Deprecated final public static function @codeCoverageIgnore
TestCase::returnSelf Deprecated final public static function @codeCoverageIgnore
TestCase::returnValue Deprecated final public static function @codeCoverageIgnore
TestCase::returnValueMap Deprecated final public static function @codeCoverageIgnore
TestCase::run final public function @internal This method is not covered by the backward compatibility promise for PHPUnit Overrides Test::run
TestCase::runBare final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::runTest protected function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setBackupGlobals final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setBackupGlobalsExcludeList final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setBackupStaticProperties final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setBackupStaticPropertiesExcludeList final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setData final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setDependencies final public function @psalm-param list&lt;ExecutionOrderDependency&gt; $dependencies
TestCase::setDependencyInput final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setGroups final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setInIsolation final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setLocale Deprecated protected function This method is a wrapper for the setlocale() function that automatically
resets the locale to its original value after the test is run.
TestCase::setName final public function @psalm-param non-empty-string $name
TestCase::setPreserveGlobalState final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setResult final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setRunClassInSeparateProcess final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setRunTestInSeparateProcess final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::setUpBeforeClass public static function This method is called before the first test of this test class is run.
TestCase::shouldExceptionExpectationsBeVerified private function
TestCase::shouldInvocationMockerBeReset private function
TestCase::shouldRunInSeparateProcess private function
TestCase::size final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::snapshotGlobalState private function
TestCase::sortId final public function @internal This method is not covered by the backward compatibility promise for PHPUnit Overrides Reorderable::sortId
TestCase::startOutputBuffering private function
TestCase::status final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::stopOutputBuffering private function
TestCase::tearDown protected function This method is called after each test. 2
TestCase::tearDownAfterClass public static function This method is called after the last test of this test class is run.
TestCase::throwException final public static function
TestCase::toString public function Returns a string representation of the test case. Overrides SelfDescribing::toString
TestCase::transformException protected function
TestCase::unregisterCustomComparators private function
TestCase::usesDataProvider final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::valueObjectForEvents final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::verifyExceptionExpectations private function
TestCase::verifyMockObjects private function
TestCase::wasPrepared final public function @internal This method is not covered by the backward compatibility promise for PHPUnit
TestCase::__construct public function @psalm-param non-empty-string $name
RSS feed
Powered by Drupal