Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /** * This file tests IpPoolName. */ namespace SendGrid\Tests\Unit; use PHPUnit\..
Decoded Output download
<?php
/**
* This file tests IpPoolName.
*/
namespace SendGrid\Tests\Unit;
use PHPUnit\Framework\TestCase;
use SendGrid\Mail\IpPoolName;
use SendGrid\Mail\TypeException;
/**
* This file tests IpPoolName.
*
* @package SendGrid\Tests
*/
class IpPoolNameTest extends TestCase
{
public function testConstructor()
{
$ipPoolName = new IpPoolName('127.0.0.1');
$this->assertInstanceOf(IpPoolName::class, $ipPoolName);
$this->assertSame('127.0.0.1', $ipPoolName->getIpPoolName());
}
public function testSetIpPoolNme()
{
$ipPoolName = new IpPoolName();
$ipPoolName->setIpPoolName('127.0.0.1');
$this->assertSame('127.0.0.1', $ipPoolName->getIpPoolName());
}
public function testSetIpPoolNmeOnInvalidType()
{
$this->expectException(TypeException::class);
$this->expectExceptionMessageMatches('/"\$ip_pool_name" must be a string/');
$ipPoolName = new IpPoolName();
$ipPoolName->setIpPoolName(123);
}
public function testJsonSerialize()
{
$ipPoolName = new IpPoolName();
$ipPoolName->setIpPoolName('127.0.0.1');
$this->assertSame('127.0.0.1', $ipPoolName->jsonSerialize());
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* This file tests IpPoolName.
*/
namespace SendGrid\Tests\Unit;
use PHPUnit\Framework\TestCase;
use SendGrid\Mail\IpPoolName;
use SendGrid\Mail\TypeException;
/**
* This file tests IpPoolName.
*
* @package SendGrid\Tests
*/
class IpPoolNameTest extends TestCase
{
public function testConstructor()
{
$ipPoolName = new IpPoolName('127.0.0.1');
$this->assertInstanceOf(IpPoolName::class, $ipPoolName);
$this->assertSame('127.0.0.1', $ipPoolName->getIpPoolName());
}
public function testSetIpPoolNme()
{
$ipPoolName = new IpPoolName();
$ipPoolName->setIpPoolName('127.0.0.1');
$this->assertSame('127.0.0.1', $ipPoolName->getIpPoolName());
}
public function testSetIpPoolNmeOnInvalidType()
{
$this->expectException(TypeException::class);
$this->expectExceptionMessageMatches('/"\$ip_pool_name" must be a string/');
$ipPoolName = new IpPoolName();
$ipPoolName->setIpPoolName(123);
}
public function testJsonSerialize()
{
$ipPoolName = new IpPoolName();
$ipPoolName->setIpPoolName('127.0.0.1');
$this->assertSame('127.0.0.1', $ipPoolName->jsonSerialize());
}
}
Function Calls
None |
Stats
MD5 | 3640d0c18c04914e1dcc022229fa7bff |
Eval Count | 0 |
Decode Time | 91 ms |