for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Azine\MailgunWebhooksBundle\Tests\Services\HetrixtoolsService;
use Azine\MailgunWebhooksBundle\Services\HetrixtoolsService\AzineMailgunHetrixtoolsService;
use Azine\MailgunWebhooksBundle\Services\HetrixtoolsService\HetrixtoolsServiceResponse;
class AzineMailgunHetrixtoolsServiceTest extends \PHPUnit_Framework_TestCase
{
/**
* @expectedException \InvalidArgumentException
*/
public function testIfApiKeyisNotSet()
$apiKey = '';
$url = 'blacklistIpCheckUr';
$ip = '44.44.44.44';
$service = new AzineMailgunHetrixtoolsService($apiKey, $url);
$service->checkIpAddressInBlacklist($ip);
}
public function testIfInvalidIpisGiven()
$apiKey = 'testApiKey';
//Test with empty ip
$ip = '';
//Test with invalid ip
$ip = 'invalidIpAddress';