for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of Badcow DNS Library.
*
* (c) Samuel Williams <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Badcow\DNS\Tests\Rdata;
use Badcow\DNS\Rdata\MX;
class MxRdataTest extends \PHPUnit\Framework\TestCase
{
public function testSetters()
$target = 'foo.example.com.';
$preference = 10;
$mx = new MX();
$mx->setExchange($target);
$mx->setPreference($preference);
$this->assertEquals($target, $mx->getExchange());
$this->assertEquals($preference, $mx->getPreference());
}
public function testOutput()
$mx->SetExchange($target);
$mx->setPreference(42);
$this->assertEquals('42 foo.example.com.', $mx->output());