prefix
stringlengths
512
512
suffix
stringlengths
256
256
middle
stringlengths
14
229
meta
dict
hp declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversM...
IsStringTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $actual): void { $this->assertIsNotString($actual); } public function testFailsWhenConstraintEvaluatesToFalse(): void {
sMethod(Assert::class, 'assertIsNotString')] #[TestDox('assertIsNotString()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsNotStringTest extends TestCase { #[DataProviderExternal(assert
{ "filepath": "tests/unit/Framework/Assert/assertIsNotStringTest.php", "language": "php", "file_size": 1112, "cut_index": 515, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use const PHP_OS_FAMILY; use function chmod; use function mkdi...
ramework/assertions')] final class assertIsNotWritableTest extends TestCase { private ?string $directory = null; private ?string $file = null; protected function tearDown(): void { if ($this->directory !== null) {
ributes\Group; use PHPUnit\Framework\Attributes\Small; use PHPUnit\Framework\Attributes\TestDox; #[CoversMethod(Assert::class, 'assertIsNotWritable')] #[TestDox('assertIsNotWritable()')] #[Small] #[Group('framework')] #[Group('f
{ "filepath": "tests/unit/Framework/Assert/assertIsNotWritableTest.php", "language": "php", "file_size": 2008, "cut_index": 537, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function fclose; use function fopen; use PHPUnit\Framework...
@return non-empty-list<array{0: mixed}> */ public static function successProvider(): array { return [ ['123'], ['123.456'], ]; } /** * @return non-empty-list<array{0: mixed}> */ p
x; use stdClass; #[CoversMethod(Assert::class, 'assertIsNumeric')] #[TestDox('assertIsNumeric()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsNumericTest extends TestCase { /** *
{ "filepath": "tests/unit/Framework/Assert/assertIsNumericTest.php", "language": "php", "file_size": 1822, "cut_index": 537, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function fclose; use function fopen; use PHPUnit\Framework...
eturn non-empty-list<array{0: mixed}> */ public static function failureProvider(): array { $openResource = fopen(__FILE__, 'r'); $closedResource = fopen(__FILE__, 'r'); fclose($closedResource); return [
x; use stdClass; #[CoversMethod(Assert::class, 'assertIsObject')] #[TestDox('assertIsObject()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsObjectTest extends TestCase { /** * @r
{ "filepath": "tests/unit/Framework/Assert/assertIsObjectTest.php", "language": "php", "file_size": 1597, "cut_index": 537, "middle_length": 229 }
art of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use const DIRECTORY_SEPARATOR; use const PHP_OS_FAMILY; use function chmod; use function...
('assertIsReadable()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsReadableTest extends TestCase { private ?string $directory = null; private ?string $file = null; /** * @return non-empty-list
se PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\Small; use PHPUnit\Framework\Attributes\TestDox; #[CoversMethod(Assert::class, 'assertIsReadable')] #[TestDox
{ "filepath": "tests/unit/Framework/Assert/assertIsReadableTest.php", "language": "php", "file_size": 2627, "cut_index": 563, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function fclose; use function fopen; use PHPUnit\Framework...
* @return non-empty-list<array{0: mixed}> */ public static function successProvider(): array { $openResource = fopen(__FILE__, 'r'); $closedResource = fopen(__FILE__, 'r'); fclose($closedResource); return [
x; use stdClass; #[CoversMethod(Assert::class, 'assertIsResource')] #[TestDox('assertIsResource()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsResourceTest extends TestCase { /**
{ "filepath": "tests/unit/Framework/Assert/assertIsResourceTest.php", "language": "php", "file_size": 1820, "cut_index": 537, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function fclose; use function fopen; use PHPUnit\Framework...
eturn non-empty-list<array{0: mixed}> */ public static function successProvider(): array { return [ [true], [false], [0], [0.0], ['string'], ]; } /** * @
x; use stdClass; #[CoversMethod(Assert::class, 'assertIsScalar')] #[TestDox('assertIsScalar()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsScalarTest extends TestCase { /** * @r
{ "filepath": "tests/unit/Framework/Assert/assertIsScalarTest.php", "language": "php", "file_size": 1828, "cut_index": 537, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function fclose; use function fopen; use PHPUnit\Framework...
eturn non-empty-list<array{0: mixed}> */ public static function failureProvider(): array { $openResource = fopen(__FILE__, 'r'); $closedResource = fopen(__FILE__, 'r'); fclose($closedResource); return [
x; use stdClass; #[CoversMethod(Assert::class, 'assertIsString')] #[TestDox('assertIsString()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsStringTest extends TestCase { /** * @r
{ "filepath": "tests/unit/Framework/Assert/assertIsStringTest.php", "language": "php", "file_size": 1576, "cut_index": 537, "middle_length": 229 }
art of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use const DIRECTORY_SEPARATOR; use const PHP_OS_FAMILY; use function chmod; use function...
('assertIsWritable()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsWritableTest extends TestCase { private ?string $directory = null; private ?string $file = null; /** * @return non-empty-list
se PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\Small; use PHPUnit\Framework\Attributes\TestDox; #[CoversMethod(Assert::class, 'assertIsWritable')] #[TestDox
{ "filepath": "tests/unit/Framework/Assert/assertIsWritableTest.php", "language": "php", "file_size": 2627, "cut_index": 563, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
void { $this->assertJsonFileEqualsJsonFile( TEST_FILES_PATH . 'JsonData/simpleObject.json', TEST_FILES_PATH . 'JsonData/simpleObject.json', ); } public function testFailsWhenConstraintEvaluatesToFalse()
x('assertJsonFileEqualsJsonFile()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertJsonFileEqualsJsonFileTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue():
{ "filepath": "tests/unit/Framework/Assert/assertJsonFileEqualsJsonFileTest.php", "language": "php", "file_size": 1267, "cut_index": 524, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
ToTrue(): void { $this->assertJsonFileNotEqualsJsonFile( TEST_FILES_PATH . 'JsonData/arrayObject.json', TEST_FILES_PATH . 'JsonData/simpleObject.json', ); } public function testFailsWhenConstraintEvaluat
tDox('assertJsonFileNotEqualsJsonFile()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertJsonFileNotEqualsJsonFileTest extends TestCase { public function testSucceedsWhenConstraintEvaluates
{ "filepath": "tests/unit/Framework/Assert/assertJsonFileNotEqualsJsonFileTest.php", "language": "php", "file_size": 1282, "cut_index": 524, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function json_encode; use PHPUnit\Framework\A...
WhenConstraintEvaluatesToTrue(): void { $this->assertJsonStringEqualsJsonFile( TEST_FILES_PATH . 'JsonData/simpleObject.json', json_encode(['Mascott' => 'Tux']), ); } public function testFailsWhenConstra
ngEqualsJsonFile')] #[TestDox('assertJsonStringEqualsJsonFile()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertJsonStringEqualsJsonFileTest extends TestCase { public function testSucceeds
{ "filepath": "tests/unit/Framework/Assert/assertJsonStringEqualsJsonFileTest.php", "language": "php", "file_size": 1277, "cut_index": 524, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Fra...
turn non-empty-list<array{0: non-empty-string, 1: non-empty-string}> */ public static function successProvider(): array { return [ ['{"Mascot" : "elePHPant"}', '{"Mascot" : "elePHPant"}'], ]; } /** * @
JsonStringEqualsJsonString')] #[TestDox('assertJsonStringEqualsJsonString()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertJsonStringEqualsJsonStringTest extends TestCase { /** * @re
{ "filepath": "tests/unit/Framework/Assert/assertJsonStringEqualsJsonStringTest.php", "language": "php", "file_size": 1797, "cut_index": 537, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function json_encode; use PHPUnit\Framework\A...
tSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertJsonStringNotEqualsJsonFile( TEST_FILES_PATH . 'JsonData/arrayObject.json', json_encode(['Mascott' => 'Tux']), ); } public function testFails
ngNotEqualsJsonFile')] #[TestDox('assertJsonStringNotEqualsJsonFile()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertJsonStringNotEqualsJsonFileTest extends TestCase { public function tes
{ "filepath": "tests/unit/Framework/Assert/assertJsonStringNotEqualsJsonFileTest.php", "language": "php", "file_size": 1292, "cut_index": 524, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
TestCase { #[DataProviderExternal(assertJsonStringEqualsJsonStringTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(string $expectedJson, string $actualJson): void { $this->assertJsonStringNotEq
ssert::class, 'assertJsonStringNotEqualsJsonString')] #[TestDox('assertJsonStringNotEqualsJsonString()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertJsonStringNotEqualsJsonStringTest extends
{ "filepath": "tests/unit/Framework/Assert/assertJsonStringNotEqualsJsonStringTest.php", "language": "php", "file_size": 1416, "cut_index": 524, "middle_length": 229 }
n <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\Small; use ...
tSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertJson('{}'); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class); $this->assertJson('
tJsonTest extends TestCase { public function tes
{ "filepath": "tests/unit/Framework/Assert/assertJsonTest.php", "language": "php", "file_size": 926, "cut_index": 606, "middle_length": 52 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
array{0: int, 1: int}> */ public static function successProvider(): array { return [ [2, 1], [2, 2], ]; } #[DataProvider('successProvider')] public function testSucceedsWhenConstraintEvaluat
lass, 'assertLessThanOrEqual')] #[TestDox('assertLessThanOrEqual()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertLessThanOrEqualTest extends TestCase { /** * @return non-empty-list<
{ "filepath": "tests/unit/Framework/Assert/assertLessThanOrEqualTest.php", "language": "php", "file_size": 1313, "cut_index": 524, "middle_length": 229 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMeth...
intEvaluatesToTrue(): void { $this->assertFileNotEqualsCanonicalizing( TEST_FILES_PATH . 'foo.xml', TEST_FILES_PATH . 'bar.xml', ); } public function testFailsWhenConstraintEvaluatesToFalse(): void {
)] #[TestDox('assertFileNotEqualsCanonicalizing()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertFileNotEqualsCanonicalizingTest extends TestCase { public function testSucceedsWhenConstra
{ "filepath": "tests/unit/Framework/Assert/assertFileNotEqualsCanonicalizingTest.php", "language": "php", "file_size": 1217, "cut_index": 518, "middle_length": 229 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMeth...
luatesToTrue(): void { $this->assertFileNotEqualsIgnoringCase( TEST_FILES_PATH . 'foo.xml', TEST_FILES_PATH . 'bar.xml', ); } public function testFailsWhenConstraintEvaluatesToFalse(): void {
#[TestDox('assertFileNotEqualsIgnoringCase()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertFileNotEqualsIgnoringCaseTest extends TestCase { public function testSucceedsWhenConstraintEva
{ "filepath": "tests/unit/Framework/Assert/assertFileNotEqualsIgnoringCaseTest.php", "language": "php", "file_size": 1216, "cut_index": 518, "middle_length": 229 }
* (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use const INF; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Framework\Attributes\Group; use P...
st extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertFinite(1); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFaile
('framework/assertions')] final class assertFiniteTe
{ "filepath": "tests/unit/Framework/Assert/assertFiniteTest.php", "language": "php", "file_size": 949, "cut_index": 582, "middle_length": 52 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
pty-list<array{0: int, 1: int}> */ public static function successProvider(): array { return [ [1, 2], [2, 2], ]; } #[DataProvider('successProvider')] public function testSucceedsWhenConstrai
lass, 'assertGreaterThanOrEqual')] #[TestDox('assertGreaterThanOrEqual()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertGreaterThanOrEqualTest extends TestCase { /** * @return non-em
{ "filepath": "tests/unit/Framework/Assert/assertGreaterThanOrEqualTest.php", "language": "php", "file_size": 1328, "cut_index": 524, "middle_length": 229 }
* (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use const INF; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Framework\Attributes\Group; use P...
niteTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertInfinite(INF); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(Asse
roup('framework/assertions')] final class assertInfi
{ "filepath": "tests/unit/Framework/Assert/assertInfiniteTest.php", "language": "php", "file_size": 959, "cut_index": 582, "middle_length": 52 }
art of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversMet...
Test extends TestCase { /** * @return non-empty-list<array{0: non-empty-string, 1: mixed}> */ public static function successProvider(): array { return [ [stdClass::class, new stdClass], ]; } /**
oversMethod(Assert::class, 'assertInstanceOf')] #[CoversClass(UnknownClassOrInterfaceException::class)] #[TestDox('assertInstanceOf()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertInstanceOf
{ "filepath": "tests/unit/Framework/Assert/assertInstanceOfTest.php", "language": "php", "file_size": 2035, "cut_index": 563, "middle_length": 229 }
art of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function fclose; use function fopen; use PHPUnit\Framework\Attributes\CoversMethod; ...
<array{0: mixed}> */ public static function successProvider(): array { return [ [ static function (): void { }, ], ['PHPUnit\Framework\assertIsCallable
Method(Assert::class, 'assertIsCallable')] #[TestDox('assertIsCallable()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsCallableTest extends TestCase { /** * @return non-empty-list
{ "filepath": "tests/unit/Framework/Assert/assertIsCallableTest.php", "language": "php", "file_size": 2042, "cut_index": 563, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function fclose; use function fopen; use PHPUnit\Framework...
Case { /** * @return non-empty-list<array{0: mixed}> */ public static function failureProvider(): array { $openResource = fopen(__FILE__, 'r'); return [ [[]], [true], [0.0],
x; use stdClass; #[CoversMethod(Assert::class, 'assertIsClosedResource')] #[TestDox('assertIsClosedResource()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsClosedResourceTest extends Test
{ "filepath": "tests/unit/Framework/Assert/assertIsClosedResourceTest.php", "language": "php", "file_size": 1637, "cut_index": 537, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Fra...
t<array{0: mixed, 1: mixed}> */ public static function successProvider(): array { return [ [[3, 2, 1], [2, 3, 1]], ]; } /** * @return non-empty-list<array{0: mixed, 1: mixed}> */ public static
EqualsCanonicalizing')] #[TestDox('assertEqualsCanonicalizing()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertEqualsCanonicalizingTest extends TestCase { /** * @return non-empty-lis
{ "filepath": "tests/unit/Framework/Assert/assertEqualsCanonicalizingTest.php", "language": "php", "file_size": 1625, "cut_index": 537, "middle_length": 229 }
HPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\Small; use PHPUnit\Framework\Attributes\TestDox; use PHPUnit\TestFixture\Author; use PHPUnit\TestFixture\Book; use PHPUnit\TestFixture\ClassWithToString; use ...
c function successProvider(): array { return array_merge(self::equalValues(), assertSameTest::sameValues()); } /** * @return non-empty-list<array{0: mixed, 1: mixed}> */ public static function failureProvider(): array
[TestDox('assertEquals()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertEqualsTest extends TestCase { /** * @return non-empty-list<array{0: mixed, 1: mixed}> */ public stati
{ "filepath": "tests/unit/Framework/Assert/assertEqualsTest.php", "language": "php", "file_size": 11245, "cut_index": 921, "middle_length": 229 }
n <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\Small; use ...
testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertFalse(false); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class); $this->assertF
ertFalseTest extends TestCase { public function
{ "filepath": "tests/unit/Framework/Assert/assertFalseTest.php", "language": "php", "file_size": 934, "cut_index": 606, "middle_length": 52 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMeth...
tesToTrue(): void { $this->assertFileNotEquals(TEST_FILES_PATH . 'foo.txt', TEST_FILES_PATH . 'bar.txt'); $this->assertFileEqualsCanonicalizing(TEST_FILES_PATH . 'foo.txt', TEST_FILES_PATH . 'foo.txt'); } public function testFa
#[TestDox('assertFileEqualsCanonicalizing()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertFileEqualsCanonicalizingTest extends TestCase { public function testSucceedsWhenConstraintEvalua
{ "filepath": "tests/unit/Framework/Assert/assertFileEqualsCanonicalizingTest.php", "language": "php", "file_size": 1226, "cut_index": 518, "middle_length": 229 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMeth...
rue(): void { $this->assertFileEqualsIgnoringCase( TEST_FILES_PATH . 'foo.xml', TEST_FILES_PATH . 'fooUppercase.xml', ); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $t
TestDox('assertFileEqualsIgnoringCase()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertFileEqualsIgnoringCaseTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToT
{ "filepath": "tests/unit/Framework/Assert/assertFileEqualsIgnoringCaseTest.php", "language": "php", "file_size": 1201, "cut_index": 518, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Fra...
*/ public static function successProvider(): array { return [ [__FILE__], ]; } /** * @return non-empty-list<array{0: non-empty-string}> */ public static function failureProvider(): array {
FileExists')] #[TestDox('assertFileExists()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertFileExistsTest extends TestCase { /** * @return non-empty-list<array{0: non-empty-string}>
{ "filepath": "tests/unit/Framework/Assert/assertFileExistsTest.php", "language": "php", "file_size": 1524, "cut_index": 537, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use const PHP_OS_FAMILY; use function chmod; use function octd...
assertFileIsNotWritableTest extends TestCase { private string $file; protected function setUp(): void { $this->file = tempnam(sys_get_temp_dir(), __CLASS__); } protected function tearDown(): void { @unlink($this->
butes\Small; use PHPUnit\Framework\Attributes\TestDox; #[CoversMethod(Assert::class, 'assertFileIsNotWritable')] #[TestDox('assertFileIsNotWritable()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class
{ "filepath": "tests/unit/Framework/Assert/assertFileIsNotWritableTest.php", "language": "php", "file_size": 1539, "cut_index": 537, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use const PHP_OS_FAMILY; use function chmod; use function octd...
tFileIsWritableTest extends TestCase { private string $file; protected function setUp(): void { $this->file = tempnam(sys_get_temp_dir(), __CLASS__); } protected function tearDown(): void { @unlink($this->file);
butes\Small; use PHPUnit\Framework\Attributes\TestDox; #[CoversMethod(Assert::class, 'assertFileIsWritable')] #[TestDox('assertFileIsWritable()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class asser
{ "filepath": "tests/unit/Framework/Assert/assertFileIsWritableTest.php", "language": "php", "file_size": 1524, "cut_index": 537, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
FileIgnoringWhitespaceTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertFileNotEqualsFileIgnoringWhitespace( TEST_FILES_PATH . 'string_with_spaces.txt', TEST_FIL
e')] #[CoversMethod(Assert::class, 'stringEqualsStringIgnoringWhitespace')] #[TestDox('assertFileNotEqualsFileIgnoringWhitespace()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertFileNotEquals
{ "filepath": "tests/unit/Framework/Assert/assertFileNotEqualsFileIgnoringWhitespaceTest.php", "language": "php", "file_size": 1392, "cut_index": 524, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
, 1: int}> */ public static function failureProvider(): array { return [ [2, 1], [2, 2], ]; } public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertGreater
lass, 'assertGreaterThan')] #[TestDox('assertGreaterThan()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertGreaterThanTest extends TestCase { /** * @return non-empty-list<array{0: int
{ "filepath": "tests/unit/Framework/Assert/assertGreaterThanTest.php", "language": "php", "file_size": 1293, "cut_index": 524, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function fclose; use function fopen; use PHPUnit\Framework...
rn non-empty-list<array{0: mixed}> */ public static function failureProvider(): array { $openResource = fopen(__FILE__, 'r'); $closedResource = fopen(__FILE__, 'r'); fclose($closedResource); return [
x; use stdClass; #[CoversMethod(Assert::class, 'assertIsArray')] #[TestDox('assertIsArray()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsArrayTest extends TestCase { /** * @retu
{ "filepath": "tests/unit/Framework/Assert/assertIsArrayTest.php", "language": "php", "file_size": 1592, "cut_index": 537, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function fclose; use function fopen; use PHPUnit\Framework...
rn non-empty-list<array{0: mixed}> */ public static function failureProvider(): array { $openResource = fopen(__FILE__, 'r'); $closedResource = fopen(__FILE__, 'r'); fclose($closedResource); return [
x; use stdClass; #[CoversMethod(Assert::class, 'assertIsFloat')] #[TestDox('assertIsFloat()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsFloatTest extends TestCase { /** * @retu
{ "filepath": "tests/unit/Framework/Assert/assertIsFloatTest.php", "language": "php", "file_size": 1592, "cut_index": 537, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Fra...
d, 1: mixed, 2: float}> */ public static function successProvider(): array { return [ [2.3, 2.5, 0.5], [[2.3], [2.5], 0.5], ]; } /** * @return non-empty-list<array{0: mixed, 1: mixed, 2: fl
EqualsWithDelta')] #[TestDox('assertEqualsWithDelta()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertEqualsWithDeltaTest extends TestCase { /** * @return non-empty-list<array{0: mixe
{ "filepath": "tests/unit/Framework/Assert/assertEqualsWithDeltaTest.php", "language": "php", "file_size": 1716, "cut_index": 537, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
ingWhitespaceTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertFileEqualsFileIgnoringWhitespace( TEST_FILES_PATH . 'string_with_spaces.txt', TEST_FILES_PATH . 's
] #[CoversMethod(Assert::class, 'stringEqualsStringIgnoringWhitespace')] #[TestDox('assertFileEqualsFileIgnoringWhitespace()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertFileEqualsFileIgnor
{ "filepath": "tests/unit/Framework/Assert/assertFileEqualsFileIgnoringWhitespaceTest.php", "language": "php", "file_size": 1377, "cut_index": 524, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use const PHP_OS_FAMILY; use function chmod; use function octd...
assertFileIsNotReadableTest extends TestCase { private string $file; protected function setUp(): void { $this->file = tempnam(sys_get_temp_dir(), __CLASS__); } protected function tearDown(): void { @unlink($this->
butes\Small; use PHPUnit\Framework\Attributes\TestDox; #[CoversMethod(Assert::class, 'assertFileIsNotReadable')] #[TestDox('assertFileIsNotReadable()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class
{ "filepath": "tests/unit/Framework/Assert/assertFileIsNotReadableTest.php", "language": "php", "file_size": 1539, "cut_index": 537, "middle_length": 229 }
hp declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversM...
{ $this->assertFileMatchesFormat("FOO\n", TEST_FILES_PATH . 'expectedFileFormat.txt'); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class); $this-
stDox('assertFileMatchesFormat()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertFileMatchesFormatTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void
{ "filepath": "tests/unit/Framework/Assert/assertFileMatchesFormatTest.php", "language": "php", "file_size": 1087, "cut_index": 515, "middle_length": 229 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMeth...
this->assertFileNotEquals( TEST_FILES_PATH . 'foo.xml', TEST_FILES_PATH . 'bar.xml', ); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::cl
assertFileNotEquals()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertFileNotEqualsTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $
{ "filepath": "tests/unit/Framework/Assert/assertFileNotEqualsTest.php", "language": "php", "file_size": 1147, "cut_index": 518, "middle_length": 229 }
art of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function PHPUnit\TestFixture\Generator\f; use Countable; use EmptyIterator; use PHPU...
('framework/assertions')] final class assertEmptyTest extends TestCase { /** * @return non-empty-list<array{0: mixed}> */ public static function successProvider(): array { return [ [[]], [''],
k\Attributes\Small; use PHPUnit\Framework\Attributes\TestDox; #[CoversMethod(Assert::class, 'assertEmpty')] #[CoversClass(GeneratorNotSupportedException::class)] #[TestDox('assertEmpty()')] #[Small] #[Group('framework')] #[Group
{ "filepath": "tests/unit/Framework/Assert/assertEmptyTest.php", "language": "php", "file_size": 2566, "cut_index": 563, "middle_length": 229 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMeth...
ernal(assertFileExistsTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(string $directory): void { $this->assertFileDoesNotExist($directory); } #[DataProviderExternal(assertFileExistsTest::c
thod(Assert::class, 'assertFileDoesNotExist')] #[TestDox('assertFileDoesNotExist()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertFileDoesNotExistTest extends TestCase { #[DataProviderExt
{ "filepath": "tests/unit/Framework/Assert/assertFileDoesNotExistTest.php", "language": "php", "file_size": 1241, "cut_index": 518, "middle_length": 229 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMeth...
ertFileEquals( TEST_FILES_PATH . 'foo.xml', TEST_FILES_PATH . 'foo.xml', ); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class);
ertFileEquals()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertFileEqualsTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->ass
{ "filepath": "tests/unit/Framework/Assert/assertFileEqualsTest.php", "language": "php", "file_size": 1132, "cut_index": 518, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function fclose; use function fopen; use PHPUnit\Framework...
non-empty-list<array{0: mixed}> */ public static function successProvider(): array { return [ [true], [false], ]; } /** * @return non-empty-list<array{0: mixed}> */ public static f
x; use stdClass; #[CoversMethod(Assert::class, 'assertIsBool')] #[TestDox('assertIsBool()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertIsBoolTest extends TestCase { /** * @return
{ "filepath": "tests/unit/Framework/Assert/assertIsBoolTest.php", "language": "php", "file_size": 1839, "cut_index": 537, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use const PHP_OS_FAMILY; use function chmod; use function octd...
tFileIsReadableTest extends TestCase { private string $file; protected function setUp(): void { $this->file = tempnam(sys_get_temp_dir(), __CLASS__); } protected function tearDown(): void { @unlink($this->file);
butes\Small; use PHPUnit\Framework\Attributes\TestDox; #[CoversMethod(Assert::class, 'assertFileIsReadable')] #[TestDox('assertFileIsReadable()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class asser
{ "filepath": "tests/unit/Framework/Assert/assertFileIsReadableTest.php", "language": "php", "file_size": 1524, "cut_index": 537, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Fra...
y{0: mixed, 1: mixed}> */ public static function successProvider(): array { return [ ['a', 'A'], [['a'], ['A']], ]; } /** * @return non-empty-list<array{0: mixed, 1: mixed}> */ pub
EqualsIgnoringCase')] #[TestDox('assertEqualsIgnoringCase()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertEqualsIgnoringCaseTest extends TestCase { /** * @return non-empty-list<arra
{ "filepath": "tests/unit/Framework/Assert/assertEqualsIgnoringCaseTest.php", "language": "php", "file_size": 1647, "cut_index": 537, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
oviderExternal(assertEqualsIgnoringCaseTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $expected, mixed $actual): void { $this->assertNotEqualsIgnoringCase($expected, $actual); } #[D
ssert::class, 'assertNotEqualsIgnoringCase')] #[TestDox('assertNotEqualsIgnoringCase()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertNotEqualsIgnoringCaseTest extends TestCase { #[DataPr
{ "filepath": "tests/unit/Framework/Assert/assertNotEqualsIgnoringCaseTest.php", "language": "php", "file_size": 1324, "cut_index": 524, "middle_length": 229 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function file_get_contents; use PHPUnit...
ntEvaluatesToTrue(): void { $this->assertStringEqualsFile( TEST_FILES_PATH . 'foo.xml', file_get_contents(TEST_FILES_PATH . 'foo.xml'), ); } public function testFailsWhenConstraintEvaluatesToFalse(): voi
sertStringEqualsFile')] #[TestDox('assertStringEqualsFile()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringEqualsFileTest extends TestCase { public function testSucceedsWhenConstrai
{ "filepath": "tests/unit/Framework/Assert/assertStringEqualsFileTest.php", "language": "php", "file_size": 1232, "cut_index": 518, "middle_length": 229 }
art of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Framework\Attributes\DataProv...
* @return non-empty-list<array{0: non-empty-string, 1: non-empty-string}> */ public static function successProvider(): array { return [ ["a\nb", "a\r\nb"], ["a\rb", "a\r\nb"], ["a\r\nb", "a\r\nb"],
LineEndings')] #[TestDox('assertStringEqualsStringIgnoringLineEndings()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringEqualsStringIgnoringLineEndingsTest extends TestCase { /**
{ "filepath": "tests/unit/Framework/Assert/assertStringEqualsStringIgnoringLineEndingsTest.php", "language": "php", "file_size": 2054, "cut_index": 563, "middle_length": 229 }
art of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Framework\Attributes\DataProv...
ingEqualsStringIgnoringWhitespaceTest extends TestCase { /** * @return non-empty-list<array{0: string, 1: string}> */ public static function successProvider(): array { return [ ['hello world', "hello\tworld"],
Whitespace')] #[CoversMethod(Assert::class, 'stringEqualsStringIgnoringWhitespace')] #[TestDox('assertStringEqualsStringIgnoringWhitespace()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStr
{ "filepath": "tests/unit/Framework/Assert/assertStringEqualsStringIgnoringWhitespaceTest.php", "language": "php", "file_size": 2188, "cut_index": 563, "middle_length": 229 }
hp declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversM...
tesToTrue(): void { $this->assertStringMatchesFormatFile(TEST_FILES_PATH . 'expectedFileFormat.txt', "FOO\n"); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError:
] #[TestDox('assertStringMatchesFormatFile()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringMatchesFormatFileTest extends TestCase { public function testSucceedsWhenConstraintEvalua
{ "filepath": "tests/unit/Framework/Assert/assertStringMatchesFormatFileTest.php", "language": "php", "file_size": 1117, "cut_index": 515, "middle_length": 229 }
<?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\Cove...
(): void { $this->assertStringMatchesFormat('*%s*', '***'); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class); $this->assertStringMatchesFormat(
#[TestDox('assertStringMatchesFormat()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringMatchesFormatTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue
{ "filepath": "tests/unit/Framework/Assert/assertStringMatchesFormatTest.php", "language": "php", "file_size": 1020, "cut_index": 512, "middle_length": 229 }
hp declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversM...
ion testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertStringNotContainsStringIgnoringCase('BARBARA', 'foobarbaz'); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(As
noringCase')] #[TestDox('assertStringNotContainsStringIgnoringCase()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringNotContainsStringIgnoringCaseTest extends TestCase { public funct
{ "filepath": "tests/unit/Framework/Assert/assertStringNotContainsStringIgnoringCaseTest.php", "language": "php", "file_size": 1115, "cut_index": 515, "middle_length": 229 }
?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\Cover...
uatesToTrue(): void { $this->assertStringNotContainsString('barbara', 'foobarbaz'); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class); $this->as
')] #[TestDox('assertStringNotContainsString()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringNotContainsStringTest extends TestCase { public function testSucceedsWhenConstraintEval
{ "filepath": "tests/unit/Framework/Assert/assertStringNotContainsStringTest.php", "language": "php", "file_size": 1055, "cut_index": 513, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function file_get_contents; use PHPUnit\Frame...
public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertStringNotEqualsFileCanonicalizing( TEST_FILES_PATH . 'foo.txt', file_get_contents(TEST_FILES_PATH . 'foo.txt') . 'BAR', );
ringNotEqualsFileCanonicalizing')] #[TestDox('assertStringNotEqualsFileCanonicalizing()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringNotEqualsFileCanonicalizingTest extends TestCase {
{ "filepath": "tests/unit/Framework/Assert/assertStringNotEqualsFileCanonicalizingTest.php", "language": "php", "file_size": 1325, "cut_index": 524, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function file_get_contents; use PHPUnit\Frame...
ublic function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertStringNotEqualsFileIgnoringCase( TEST_FILES_PATH . 'foo.xml', file_get_contents(TEST_FILES_PATH . 'bar.xml'), ); } public f
ringNotEqualsFileIgnoringCase')] #[TestDox('assertStringNotEqualsFileIgnoringCase()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringNotEqualsFileIgnoringCaseTest extends TestCase { p
{ "filepath": "tests/unit/Framework/Assert/assertStringNotEqualsFileIgnoringCaseTest.php", "language": "php", "file_size": 1316, "cut_index": 524, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function file_get_contents; use PHPUnit\Frame...
s')] final class assertStringNotEqualsFileIgnoringWhitespaceTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertStringNotEqualsFileIgnoringWhitespace( TEST_FILES_PATH . 'strin
ringNotEqualsFileIgnoringWhitespace')] #[CoversMethod(Assert::class, 'stringEqualsStringIgnoringWhitespace')] #[TestDox('assertStringNotEqualsFileIgnoringWhitespace()')] #[Small] #[Group('framework')] #[Group('framework/assertion
{ "filepath": "tests/unit/Framework/Assert/assertStringNotEqualsFileIgnoringWhitespaceTest.php", "language": "php", "file_size": 1472, "cut_index": 524, "middle_length": 229 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function file_get_contents; use PHPUnit...
nConstraintEvaluatesToTrue(): void { $this->assertStringNotEqualsFile( TEST_FILES_PATH . 'foo.xml', file_get_contents(TEST_FILES_PATH . 'bar.xml'), ); } public function testFailsWhenConstraintEvaluatesTo
sertStringNotEqualsFile')] #[TestDox('assertStringNotEqualsFile()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringNotEqualsFileTest extends TestCase { public function testSucceedsWhe
{ "filepath": "tests/unit/Framework/Assert/assertStringNotEqualsFileTest.php", "language": "php", "file_size": 1247, "cut_index": 518, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Fra...
work/assertions')] final class assertStringNotEqualsStringIgnoringWhitespaceTest extends TestCase { #[DataProviderExternal(assertStringEqualsStringIgnoringWhitespaceTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluate
'assertStringNotEqualsStringIgnoringWhitespace')] #[CoversMethod(Assert::class, 'stringEqualsStringIgnoringWhitespace')] #[TestDox('assertStringNotEqualsStringIgnoringWhitespace()')] #[Small] #[Group('framework')] #[Group('frame
{ "filepath": "tests/unit/Framework/Assert/assertStringNotEqualsStringIgnoringWhitespaceTest.php", "language": "php", "file_size": 1525, "cut_index": 537, "middle_length": 229 }
?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\Cover...
): void { $this->assertStringStartsNotWith('prefix', 'foo'); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class); $this->assertStringStartsNotWith
#[TestDox('assertStringStartsNotWith()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringStartsNotWithTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(
{ "filepath": "tests/unit/Framework/Assert/assertStringStartsNotWithTest.php", "language": "php", "file_size": 1031, "cut_index": 513, "middle_length": 229 }
<?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\Cove...
{ $this->assertStringStartsWith('prefix', 'prefixfoo'); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class); $this->assertStringStartsWith('prefix
TestDox('assertStringStartsWith()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringStartsWithTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void
{ "filepath": "tests/unit/Framework/Assert/assertStringStartsWithTest.php", "language": "php", "file_size": 1016, "cut_index": 512, "middle_length": 229 }
it\Framework\Attributes\DoesNotPerformAssertions; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\Small; use PHPUnit\Framework\Attributes\TestDox; use PHPUnit\TestFixture\Book; use PHPUnit\TestFixture\ObjectEquals\ValueObject; use stdClass; #[CoversClass(Assert::class)] #[TestDox('assertThat()...
(): void { $this->assertThat(false, $this->isFalse()); } public function testAssertThatIsJson(): void { $this->assertThat('{}', $this->isJson()); } #[DoesNotPerformAssertions] public function testAssertThatAnyt
void { $this->assertThat('anything', $this->anything()); } public function testAssertThatIsTrue(): void { $this->assertThat(true, $this->isTrue()); } public function testAssertThatIsFalse
{ "filepath": "tests/unit/Framework/Assert/assertThatTest.php", "language": "php", "file_size": 10294, "cut_index": 921, "middle_length": 229 }
<?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\Cove...
); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class); /* @noinspection PhpUnitAssertCanBeReplacedWithFailInspection */ $this->assertTrue(false);
ertTrue()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertTrueTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertTrue(true
{ "filepath": "tests/unit/Framework/Assert/assertTrueTest.php", "language": "php", "file_size": 1002, "cut_index": 512, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
nction testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertXmlFileEqualsXmlFileConsideringComments( TEST_FILES_PATH . 'xml-with-comments.xml', TEST_FILES_PATH . 'xml-with-comments.xml', ); }
ments')] #[TestDox('assertXmlFileEqualsXmlFileConsideringComments()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertXmlFileEqualsXmlFileConsideringCommentsTest extends TestCase { public fu
{ "filepath": "tests/unit/Framework/Assert/assertXmlFileEqualsXmlFileConsideringCommentsTest.php", "language": "php", "file_size": 1336, "cut_index": 524, "middle_length": 229 }
?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\Cover...
ue(): void { $this->assertStringContainsString('bar', 'foobarbaz'); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class); $this->assertStringContai
#[TestDox('assertStringContainsString()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringContainsStringTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTr
{ "filepath": "tests/unit/Framework/Assert/assertStringContainsStringTest.php", "language": "php", "file_size": 1040, "cut_index": 513, "middle_length": 229 }
<?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\Cove...
$this->assertStringEndsWith('suffix', 'foosuffix'); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class); $this->assertStringEndsWith('suffix', 'foo');
stDox('assertStringEndsWith()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringEndsWithTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void {
{ "filepath": "tests/unit/Framework/Assert/assertStringEndsWithTest.php", "language": "php", "file_size": 1006, "cut_index": 512, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function file_get_contents; use PHPUnit\Frame...
inal class assertStringEqualsFileIgnoringWhitespaceTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertStringEqualsFileIgnoringWhitespace( TEST_FILES_PATH . 'string_with_space
ringEqualsFileIgnoringWhitespace')] #[CoversMethod(Assert::class, 'stringEqualsStringIgnoringWhitespace')] #[TestDox('assertStringEqualsFileIgnoringWhitespace()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] f
{ "filepath": "tests/unit/Framework/Assert/assertStringEqualsFileIgnoringWhitespaceTest.php", "language": "php", "file_size": 1457, "cut_index": 524, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Fra...
on-empty-list<array{0: non-empty-string, 1: non-empty-string}> */ public static function successProvider(): array { return [ ['/foo/', 'foobar'], ]; } /** * @return non-empty-list<array{0: non-empty-st
MatchesRegularExpression')] #[TestDox('assertMatchesRegularExpression()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertMatchesRegularExpressionTest extends TestCase { /** * @return n
{ "filepath": "tests/unit/Framework/Assert/assertMatchesRegularExpressionTest.php", "language": "php", "file_size": 1680, "cut_index": 537, "middle_length": 229 }
n <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use const NAN; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attribu...
function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertNan(NAN); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedError::class); $this->as
l class assertNanTest extends TestCase { public
{ "filepath": "tests/unit/Framework/Assert/assertNanTest.php", "language": "php", "file_size": 934, "cut_index": 606, "middle_length": 52 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function PHPUnit\TestFixture\Generator\f; use Countable; u...
'framework')] #[Group('framework/assertions')] final class assertNotCountTest extends TestCase { #[DataProviderExternal(assertCountTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(int $expectedCount, Counta
HPUnit\Framework\Attributes\Small; use PHPUnit\Framework\Attributes\TestDox; #[CoversMethod(Assert::class, 'assertNotCount')] #[CoversClass(GeneratorNotSupportedException::class)] #[TestDox('assertNotCount()')] #[Small] #[Group(
{ "filepath": "tests/unit/Framework/Assert/assertNotCountTest.php", "language": "php", "file_size": 1752, "cut_index": 537, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
DataProviderExternal(assertEqualsCanonicalizingTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $expected, mixed $actual): void { $this->assertNotEqualsCanonicalizing($expected, $actual);
ssert::class, 'assertNotEqualsCanonicalizing')] #[TestDox('assertNotEqualsCanonicalizing()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertNotEqualsCanonicalizingTest extends TestCase { #[
{ "filepath": "tests/unit/Framework/Assert/assertNotEqualsCanonicalizingTest.php", "language": "php", "file_size": 1338, "cut_index": 524, "middle_length": 229 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMeth...
t::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $expected, mixed $actual): void { $this->assertNotEquals($expected, $actual); } #[DataProviderExternal(assertEqualsTest::class, 'successP
thod(Assert::class, 'assertNotEquals')] #[TestDox('assertNotEquals()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertNotEqualsTest extends TestCase { #[DataProviderExternal(assertEqualsTes
{ "filepath": "tests/unit/Framework/Assert/assertNotEqualsTest.php", "language": "php", "file_size": 1240, "cut_index": 518, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
*/ public static function successProvider(): array { return [ [true], [null], [0], [1], ['false'], ]; } #[DataProvider('successProvider')] public function tes
lass, 'assertNotFalse')] #[TestDox('assertNotFalse()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertNotFalseTest extends TestCase { /** * @return non-empty-list<array{0: mixed}>
{ "filepath": "tests/unit/Framework/Assert/assertNotFalseTest.php", "language": "php", "file_size": 1304, "cut_index": 524, "middle_length": 229 }
hp declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversM...
ass, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $actual): void { $this->assertNotNull($actual); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectE
sMethod(Assert::class, 'assertNotNull')] #[TestDox('assertNotNull()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertNotNullTest extends TestCase { #[DataProviderExternal(assertNullTest::cl
{ "filepath": "tests/unit/Framework/Assert/assertNotNullTest.php", "language": "php", "file_size": 1084, "cut_index": 515, "middle_length": 229 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMeth...
, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $expected, mixed $actual): void { $this->assertNotSame($expected, $actual); } #[DataProviderExternal(assertSameTest::class, 'successProvider')]
thod(Assert::class, 'assertNotSame')] #[TestDox('assertNotSame()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertNotSameTest extends TestCase { #[DataProviderExternal(assertSameTest::class
{ "filepath": "tests/unit/Framework/Assert/assertNotSameTest.php", "language": "php", "file_size": 1226, "cut_index": 518, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function fclose; use function fopen; use PHPUnit\Framework...
pty-list<array{0: mixed}> */ public static function failureProvider(): array { $openResource = fopen(__FILE__, 'r'); $closedResource = fopen(__FILE__, 'r'); fclose($closedResource); return [ [['foo
x; use stdClass; #[CoversMethod(Assert::class, 'assertNull')] #[TestDox('assertNull()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertNullTest extends TestCase { /** * @return non-em
{ "filepath": "tests/unit/Framework/Assert/assertNullTest.php", "language": "php", "file_size": 1631, "cut_index": 537, "middle_length": 229 }
declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMeth...
ue(): void { $object = new stdClass; $object->theProperty = 'value'; $this->assertObjectHasProperty('theProperty', $object); } public function testFailsWhenConstraintEvaluatesToFalse(): void {
rty')] #[TestDox('assertObjectHasProperty()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertObjectHasPropertyTest extends TestCase { public function testSucceedsWhenConstraintEvaluatesToTr
{ "filepath": "tests/unit/Framework/Assert/assertObjectHasPropertyTest.php", "language": "php", "file_size": 1162, "cut_index": 518, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
ertObjectEqualsTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(object $expected, object $actual, string $method): void { $this->assertObjectNotEquals($expected, $actual, $method); } #[Data
ssert::class, 'assertObjectNotEquals')] #[TestDox('assertObjectNotEquals()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertObjectNotEqualsTest extends TestCase { #[DataProviderExternal(ass
{ "filepath": "tests/unit/Framework/Assert/assertObjectNotEqualsTest.php", "language": "php", "file_size": 1336, "cut_index": 524, "middle_length": 229 }
art of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function PHPUnit\TestFixture\Generator\f; use Countable; use PHPUnit\Framework\Attri...
ssertions')] final class assertSameSizeTest extends TestCase { /** * @return non-empty-list<array{0: Countable|iterable<mixed>, 1: Countable|iterable<mixed>}> */ public static function successProvider(): array { return [
use PHPUnit\Framework\Attributes\TestDox; #[CoversMethod(Assert::class, 'assertSameSize')] #[CoversClass(GeneratorNotSupportedException::class)] #[TestDox('assertSameSize()')] #[Small] #[Group('framework')] #[Group('framework/a
{ "filepath": "tests/unit/Framework/Assert/assertSameSizeTest.php", "language": "php", "file_size": 2379, "cut_index": 563, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Fra...
t extends TestCase { /** * @return non-empty-list<array{0: non-empty-string, 1: non-empty-string}> */ public static function successProvider(): array { return [ ["b\nc", "b\r\nc"], ["b\nc", "a\r\nb\r\nc
StringContainsStringIgnoringLineEndings')] #[TestDox('assertStringContainsStringIgnoringLineEndings()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringContainsStringIgnoringLineEndingsTes
{ "filepath": "tests/unit/Framework/Assert/assertStringContainsStringIgnoringLineEndingsTest.php", "language": "php", "file_size": 1879, "cut_index": 537, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function file_get_contents; use PHPUnit\Frame...
ic function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertStringEqualsFileCanonicalizing( TEST_FILES_PATH . 'foo.txt', file_get_contents(TEST_FILES_PATH . 'foo.txt'), ); } public funct
ringEqualsFileCanonicalizing')] #[TestDox('assertStringEqualsFileCanonicalizing()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringEqualsFileCanonicalizingTest extends TestCase { publ
{ "filepath": "tests/unit/Framework/Assert/assertStringEqualsFileCanonicalizingTest.php", "language": "php", "file_size": 1310, "cut_index": 524, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function file_get_contents; use PHPUnit\Frame...
ction testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertStringEqualsFileIgnoringCase( TEST_FILES_PATH . 'foo.xml', file_get_contents(TEST_FILES_PATH . 'fooUppercase.xml'), ); } public func
ringEqualsFileIgnoringCase')] #[TestDox('assertStringEqualsFileIgnoringCase()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringEqualsFileIgnoringCaseTest extends TestCase { public fun
{ "filepath": "tests/unit/Framework/Assert/assertStringEqualsFileIgnoringCaseTest.php", "language": "php", "file_size": 1301, "cut_index": 524, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
est::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $needle, iterable $haystack): void { $this->assertNotContains($needle, $haystack); } #[DataProviderExternal(assertContainsTest::class,
ssert::class, 'assertNotContains')] #[TestDox('assertNotContains()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertNotContainsTest extends TestCase { #[DataProviderExternal(assertContainsT
{ "filepath": "tests/unit/Framework/Assert/assertNotContainsTest.php", "language": "php", "file_size": 1260, "cut_index": 524, "middle_length": 229 }
hp declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversM...
ucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertStringContainsStringIgnoringCase('BAR', 'foobarbaz'); } public function testFailsWhenConstraintEvaluatesToFalse(): void { $this->expectException(AssertionFailedErr
ingCase')] #[TestDox('assertStringContainsStringIgnoringCase()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertStringContainsStringIgnoringCaseTest extends TestCase { public function testS
{ "filepath": "tests/unit/Framework/Assert/assertStringContainsStringIgnoringCaseTest.php", "language": "php", "file_size": 1100, "cut_index": 515, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
> */ public static function failureProvider(): array { return [ [1, 2], [1, 1], ]; } public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertLessThan(2, 1);
lass, 'assertLessThan')] #[TestDox('assertLessThan()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertLessThanTest extends TestCase { /** * @return non-empty-list<array{0: int, 1: int}
{ "filepath": "tests/unit/Framework/Assert/assertLessThanTest.php", "language": "php", "file_size": 1278, "cut_index": 524, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function PHPUnit\TestFixture\Generator\f; use PHPUnit\Fram...
[Group('framework/assertions')] final class assertNotEmptyTest extends TestCase { #[DataProviderExternal(assertEmptyTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $actual): void { $this-
k\Attributes\Small; use PHPUnit\Framework\Attributes\TestDox; #[CoversMethod(Assert::class, 'assertNotEmpty')] #[CoversClass(GeneratorNotSupportedException::class)] #[TestDox('assertNotEmpty()')] #[Small] #[Group('framework')] #
{ "filepath": "tests/unit/Framework/Assert/assertNotEmptyTest.php", "language": "php", "file_size": 1626, "cut_index": 537, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
ernal(assertEqualsWithDeltaTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $expected, mixed $actual, float $delta): void { $this->assertNotEqualsWithDelta($expected, $actual, $delta); }
ssert::class, 'assertNotEqualsWithDelta')] #[TestDox('assertNotEqualsWithDelta()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertNotEqualsWithDeltaTest extends TestCase { #[DataProviderExt
{ "filepath": "tests/unit/Framework/Assert/assertNotEqualsWithDeltaTest.php", "language": "php", "file_size": 1347, "cut_index": 524, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
public static function successProvider(): array { return [ [false], [null], [0], [1], ['true'], ]; } #[DataProvider('successProvider')] public function testSu
lass, 'assertNotTrue')] #[TestDox('assertNotTrue()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertNotTrueTest extends TestCase { /** * @return non-empty-list<array{0: mixed}> */
{ "filepath": "tests/unit/Framework/Assert/assertNotTrueTest.php", "language": "php", "file_size": 1298, "cut_index": 524, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Fra...
* @return non-empty-list<array{0: object, 1: object, 2: non-empty-string}> */ public static function successProvider(): array { return [ [new ValueObject(1), new ValueObject(1), 'equals'], ]; } /**
alueObject; #[CoversMethod(Assert::class, 'assertObjectEquals')] #[TestDox('assertObjectEquals()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertObjectEqualsTest extends TestCase { /**
{ "filepath": "tests/unit/Framework/Assert/assertObjectEqualsTest.php", "language": "php", "file_size": 1791, "cut_index": 537, "middle_length": 229 }
art of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use const INF; use function array_merge; use function fopen; use function log; use PHPUn...
ase { /** * @return non-empty-list<array{0: mixed, 1: mixed}> */ public static function successProvider(): array { return self::sameValues(); } /** * @return non-empty-list<array{0: mixed, 1: mixed}> */
butes\TestDox; use PHPUnit\TestFixture\SampleClass; #[CoversMethod(Assert::class, 'assertSame')] #[TestDox('assertSame()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertSameTest extends TestC
{ "filepath": "tests/unit/Framework/Assert/assertSameTest.php", "language": "php", "file_size": 2708, "cut_index": 563, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
public function testSucceedsWhenConstraintEvaluatesToTrue(): void { $this->assertXmlFileNotEqualsXmlFileConsideringComments( TEST_FILES_PATH . 'xml-with-comments.xml', TEST_FILES_PATH . 'xml-without-comments.xml',
Comments')] #[TestDox('assertXmlFileNotEqualsXmlFileConsideringComments()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertXmlFileNotEqualsXmlFileConsideringCommentsTest extends TestCase {
{ "filepath": "tests/unit/Framework/Assert/assertXmlFileNotEqualsXmlFileConsideringCommentsTest.php", "language": "php", "file_size": 1351, "cut_index": 524, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function file_get_contents; use PHPUnit\Frame...
WhenConstraintEvaluatesToTrue(): void { $this->assertXmlStringEqualsXmlFile( TEST_FILES_PATH . 'foo.xml', file_get_contents(TEST_FILES_PATH . 'foo.xml'), ); } public function testFailsWhenConstraintEvalu
lStringEqualsXmlFile')] #[TestDox('assertXmlStringEqualsXmlFile()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertXmlStringEqualsXmlFileTest extends TestCase { public function testSucceeds
{ "filepath": "tests/unit/Framework/Assert/assertXmlStringEqualsXmlFileTest.php", "language": "php", "file_size": 1470, "cut_index": 524, "middle_length": 229 }
art of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Framework\Attributes\DataProv...
Case { /** * @return non-empty-list<array{0: non-empty-string, 1: non-empty-string}> */ public static function successProvider(): array { return [ ['<root><node/></root>', '<root><node/></root>'], ['<ro
nsideringComments')] #[TestDox('assertXmlStringEqualsXmlStringConsideringComments()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertXmlStringEqualsXmlStringConsideringCommentsTest extends Test
{ "filepath": "tests/unit/Framework/Assert/assertXmlStringEqualsXmlStringConsideringCommentsTest.php", "language": "php", "file_size": 2102, "cut_index": 563, "middle_length": 229 }
s=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use function file_get_contents; use PHPUnit\Framework\Attribut...
ConstraintEvaluatesToTrue(): void { $this->assertXmlStringNotEqualsXmlFile( TEST_FILES_PATH . 'foo.xml', file_get_contents(TEST_FILES_PATH . 'bar.xml'), ); } public function testFailsWhenConstraintEvalua
alsXmlFile')] #[TestDox('assertXmlStringNotEqualsXmlFile()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertXmlStringNotEqualsXmlFileTest extends TestCase { public function testSucceedsWhen
{ "filepath": "tests/unit/Framework/Assert/assertXmlStringNotEqualsXmlFileTest.php", "language": "php", "file_size": 1580, "cut_index": 537, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
ase { #[DataProviderExternal(assertXmlStringEqualsXmlStringTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(string $expectedXml, string $actualXml): void { $this->assertXmlStringNotEqualsXmlStri
ssert::class, 'assertXmlStringNotEqualsXmlString')] #[TestDox('assertXmlStringNotEqualsXmlString()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertXmlStringNotEqualsXmlStringTest extends TestC
{ "filepath": "tests/unit/Framework/Assert/assertXmlStringNotEqualsXmlStringTest.php", "language": "php", "file_size": 1394, "cut_index": 524, "middle_length": 229 }
pes=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\F...
s failTest extends TestCase { public function testFailsTest(): void { $message = 'message'; $this->expectException(AssertionFailedError::class); $this->expectExceptionMessageIs($message); $this->fail($message);
ework')] #[Group('framework/assertions')] final clas
{ "filepath": "tests/unit/Framework/Assert/failTest.php", "language": "php", "file_size": 848, "cut_index": 535, "middle_length": 52 }
art of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework\Constraint; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attribute...
)->evaluate('actual', returnResult: true)); $this->assertFalse($this->rejectingCallbackConstraint()->evaluate('actual', returnResult: true)); try { $this->rejectingCallbackConstraint()->evaluate('actual'); } catch (Expe
ass)] #[Small] #[Group('framework')] #[Group('framework/constraints')] final class CallbackTest extends TestCase { public function testCanBeEvaluated(): void { $this->assertTrue($this->acceptingCallbackConstraint(
{ "filepath": "tests/unit/Framework/Constraint/CallbackTest.php", "language": "php", "file_size": 2803, "cut_index": 563, "middle_length": 229 }
e(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework; use PHPUnit\Framework\Attributes\CoversMethod; us...
al(assertContainsEqualsTest::class, 'failureProvider')] public function testSucceedsWhenConstraintEvaluatesToTrue(mixed $needle, iterable $haystack): void { $this->assertNotContainsEquals($needle, $haystack); } #[DataProviderExtern
ssert::class, 'assertNotContainsEquals')] #[TestDox('assertNotContainsEquals()')] #[Small] #[Group('framework')] #[Group('framework/assertions')] final class assertNotContainsEqualsTest extends TestCase { #[DataProviderExtern
{ "filepath": "tests/unit/Framework/Assert/assertNotContainsEqualsTest.php", "language": "php", "file_size": 1302, "cut_index": 524, "middle_length": 229 }