/** * Main test. */ public function testConstants() { $constants = TLD::get_constants(); foreach ($constants as $key => $value) { $this->assertTrue(TLD::get_constant($key) === $value); } }
<?php /* * Created by IntelliJ IDEA. * User: EgaLabs (c) 2015 * Date: 27/05/2015 * Time: 19:20 */ namespace Matura\Tests\URI; use Ignizr\URI\TLD; describe("Top-level domain constants", function () { it("should have all constants well defined and available through get_constants method.", function () { $constants = TLD::get_constants(); foreach ($constants as $key => $value) { expect(TLD::get_constant($key) === $value)->to->be->ok(); } }); });