#!/usr/bin/env php id->range('1-10'); $table->domain->range('rila.dops.corp.cc,7czx.dops.corp.cc,test.example.com,app.zentao.net,demo.gitlab.com,ci.jenkins.org,empty.domain.test,special-chars.com,long-domain-name-test.example.org,localhost'); $table->name->range('instance{1-10}'); $table->status->range('running'); $table->deleted->range('0'); $table->gen(10); su('admin'); $instanceTest = new instanceModelTest(); r($instanceTest->getByUrlTest('rila.dops.corp.cc')) && p('id') && e('1'); r($instanceTest->getByUrlTest('https://7czx.dops.corp.cc')) && p('id') && e('2'); r($instanceTest->getByUrlTest('http://test.example.com')) && p('id') && e('3'); r($instanceTest->getByUrlTest('nonexistent.domain.com')) && p() && e('0'); r($instanceTest->getByUrlTest('')) && p() && e('0'); r($instanceTest->getByUrlTest('special-chars.com')) && p('id') && e('8'); r($instanceTest->getByUrlTest('long-domain-name-test.example.org')) && p('id') && e('9');