assertTrue($model->isMailboxVerification()); } public function testEmailValidation() { $data = [ 'address' => 'foo@mailgun.net', 'is_disposable_address' => false, 'is_role_address' => false, 'reason' => [], 'result' => 'deliverable', 'risk' => 'low', ]; $parts = ValidateResponse::create($data); $this->assertEquals($data['address'], $parts->getAddress()); $this->assertEquals($data['is_disposable_address'], $parts->isDisposableAddress()); $this->assertEquals($data['is_role_address'], $parts->isRoleAddress()); $this->assertEquals($data['reason'], $parts->getReason()); $this->assertEquals($data['result'], $parts->getResult()); $this->assertEquals($data['risk'], $parts->getRisk()); } }