DiffMatchPatch\DiffToolkitTest::testCommonSuffix PHP Method

testCommonSuffix() public method

public testCommonSuffix ( )
    public function testCommonSuffix()
    {
        // Detect any common suffix.
        // Null case.
        $this->assertEquals(0, $this->dt->commonSuffix("abc", "xyz"));
        // Non-null case.
        $this->assertEquals(4, $this->dt->commonSuffix("abcdef1234", "xyz1234"));
        // Whole case.
        $this->assertEquals(4, $this->dt->commonSuffix("1234", "xyz1234"));
    }