Included vendor/ to the project
This commit is contained in:
34
vendor/phpunit/dbunit/tests/Constraint/TableRowCountTest.php
vendored
Normal file
34
vendor/phpunit/dbunit/tests/Constraint/TableRowCountTest.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of DbUnit.
|
||||
*
|
||||
* (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.
|
||||
*/
|
||||
|
||||
use PHPUnit\DbUnit\Constraint\TableRowCount;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
|
||||
class Extensions_Database_Constraint_TableRowCountTest extends TestCase
|
||||
{
|
||||
public function testConstraint()
|
||||
{
|
||||
$constraint = new TableRowCount('name', 42);
|
||||
|
||||
$this->assertTrue($constraint->evaluate(42, '', true));
|
||||
$this->assertFalse($constraint->evaluate(24, '', true));
|
||||
$this->assertEquals('is equal to expected row count 42', $constraint->toString());
|
||||
|
||||
try {
|
||||
$this->assertThat(24, $constraint, '');
|
||||
} catch (ExpectationFailedException $e) {
|
||||
$this->assertEquals(
|
||||
'Failed asserting that 24 is equal to expected row count 42.',
|
||||
$e->getMessage()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user