public function testConstraint() { $constraint = new PHPUnit_Extensions_Database_Constraint_TableRowCount('name', 42); $this->assertTrue($constraint->evaluate(42)); $this->assertFalse($constraint->evaluate(24)); $this->assertEquals('is equal to expected row count 42', $constraint->toString()); try { $constraint->fail(24, ''); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals('Failed asserting that table "name" has 42 rows (actual row count: 24)', $e->getMessage()); } }
public function __construct($tableName, $value) { parent::__construct($tableName, $value); $this->exporter = new Exporter(); }