dnsrecords.io/tests/Feature/IpTest.php
Brent Roose 9f487be1b2 Improve tests (#35)
* Add support for DNS lookup of . (root)

* Prefer the POST command over the GET command

* Add extra helper method to read flash message and allow for sending commands on a specified URL

* Add ClearTest

* Add IpTest

* Add ManualTest

* Add DoomTest
2017-11-06 19:43:30 +01:00

18 lines
490 B
PHP

<?php
namespace Tests\Feature;
use Tests\TestCase;
class IpTest extends TestCase
{
/** @test */
public function it_shows_your_ip_address()
{
$content = $this->sendCommand('ip')->content();
$isIpAddress = '/(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])/';
$this->assertRegExp($isIpAddress, $content);
}
}