DiffMatchPatch\DiffTest::testBisect PHP Method

testBisect() public method

public testBisect ( )
    public function testBisect()
    {
        $method = new \ReflectionMethod('DiffMatchPatch\\Diff', 'bisect');
        $method->setAccessible(true);
        // Since the resulting diff hasn't been normalized, it would be ok if
        // the insertion and deletion pairs are swapped.
        // If the order changes, tweak this test as required.
        $this->assertEquals(array(array(Diff::DELETE, "c"), array(Diff::INSERT, "m"), array(Diff::EQUAL, "a"), array(Diff::DELETE, "t"), array(Diff::INSERT, "p")), $method->invoke($this->d, 'cat', 'map', PHP_INT_MAX));
        // Timeout.
        $this->assertEquals(array(array(Diff::DELETE, "cat"), array(Diff::INSERT, "map")), $method->invoke($this->d, 'cat', 'map', 0));
    }