Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CentralNic
Badcow-DNS
Commits
af12eb96
Commit
af12eb96
authored
Jan 25, 2017
by
samuelwilliams
Browse files
Removed validator from ResourceRecord::setName
parent
d9afdae8
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/ResourceRecord.php
View file @
af12eb96
...
...
@@ -92,10 +92,6 @@ class ResourceRecord implements ResourceRecordInterface
*/
public
function
setName
(
$name
)
{
if
(
!
Validator
::
rrName
(
$name
))
{
throw
new
DNSException
(
sprintf
(
'"%s" is not a valid resource record name.'
,
$name
));
}
$this
->
name
=
(
string
)
$name
;
}
...
...
lib/Tests/ResourceRecordTest.php
View file @
af12eb96
...
...
@@ -29,15 +29,8 @@ class ResourceRecordTest extends TestCase
}
/**
* @expectedException \Badcow\DNS\DNSException
* @expectedExceptionMessage "example?record.com." is not a valid resource record name.
* Tests the getter and setter methods
*/
public
function
testSetName
()
{
$rr
=
new
ResourceRecord
();
$rr
->
setName
(
'example?record.com.'
);
}
public
function
testSettersAndGetters
()
{
$rr
=
new
ResourceRecord
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment