Skip to content

Commit

Permalink
Fix OpenSPF tests, now that openspf.org is down
Browse files Browse the repository at this point in the history
  • Loading branch information
Mika56 committed Apr 27, 2019
1 parent c08d93f commit 88a5285
Show file tree
Hide file tree
Showing 7 changed files with 5,271 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/RFC4408Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*
* @author Mikael Peigney
*/

namespace Mika56\SPFCheck;

class RFC4408Test extends OpenSPFTest
Expand All @@ -26,7 +27,7 @@ public function testRFC4408($ipAddress, $domain, DNSRecordGetterInterface $dnsDa

public function RFC4408DataProvider()
{
$scenarios = file_get_contents('http://www.openspf.org/svn/project/test-suite/rfc4408-tests.yml');
$scenarios = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'rfc4408-tests.yml');

return $this->loadTestCases($scenarios);
}
Expand Down
3 changes: 2 additions & 1 deletion tests/RFC7208Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*
* @author Mikael Peigney
*/

namespace Mika56\SPFCheck;

class RFC7208Test extends OpenSPFTest
Expand All @@ -26,7 +27,7 @@ public function testRFC7208($ipAddress, $domain, DNSRecordGetterInterface $dnsDa

public function RFC7208DataProvider()
{
$scenarios = file_get_contents('http://www.openspf.org/svn/project/test-suite/rfc7208-tests.yml');
$scenarios = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'rfc7208-tests.yml');
// Apparently there is a YML error in that file
$scenarios = str_replace('Result is none if checking SPF records only', '>-'."\n".' Result is none if checking SPF records only', $scenarios);

Expand Down
26 changes: 26 additions & 0 deletions tests/rfc4408-tests.LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
The RFC 4408 test-suite (rfc4408-tests.yml) is
(C) 2006-2007 Stuart D Gathman <[email protected]>
2007 Julian Mehnle <[email protected]>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 88a5285

Please sign in to comment.