Skip to content
This repository has been archived by the owner on Aug 26, 2019. It is now read-only.

Latest commit

 

History

History
26 lines (19 loc) · 656 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 656 Bytes

Lagged_Test_PHPUnit_Assert

A couple assertions I need. ;-)

Assertions:

  • assertUrlsAreEqual()

An example:

<?php
require_once 'PHPUnit/Autoload.php';
require_once 'Lagged/Test/PHPUnit/Assert.php';

class YourTest extends PHPUnit_Framework_TestCase
{
    public function testWhichContainsUrls()
    {
        $expected = 'http://example.org/?bar=1&foo=2'; // this is the expected
        $actual   = 'http://example.org/?foo=2&bar=1'; // this is the actual url

        Lagged_Test_PHPUnit_Assert::assertUrlsAreEqual(
            $expected, $actual, "They are not equal!"
        );
    }
}