+ /**
+ * Test Grant status with `0` value.
+ */
+ public function testGrantWithZeroStatus() {
+ $params = array(
+ 'action' => 'create',
+ 'grant_type_id' => "Emergency",
+ 'amount_total' => 100,
+ 'contact_id' => "1",
+ 'status_id' => 0,
+ 'id' => 1,
+ );
+ $validation = $this->callAPISuccess('Grant', 'validate', $params);
+
+ $expectedOut = array(
+ 'status_id' => array(
+ 'message' => "'0' is not a valid option for field status_id",
+ 'code' => "incorrect_value",
+ ),
+ );
+ $this->assertEquals($validation['values'][0], $expectedOut);
+ }
+