function rectangle_area($width, $height) { return $width * $height; }
public function testRectangleArea() { $area = rectangle_area(4, 5); $this->assertGreaterThanOrEqual(20, $area); }In this example, we assert that the area of a rectangle with width 4 and height 5 is greater than or equal to 20. If the function works correctly, this assertion will pass. PHPUnit_Framework_Assert is part of the PHPUnit package, which is a library for performing unit tests in PHP.