mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
parent
bd0104d972
commit
154b001552
3 changed files with 8 additions and 11 deletions
|
@ -329,9 +329,7 @@ object(View) {
|
||||||
float => (float) 1.333
|
float => (float) 1.333
|
||||||
}
|
}
|
||||||
TEXT;
|
TEXT;
|
||||||
$result = str_replace(array("\r\n", "\n"), "", $result);
|
$this->assertTextEquals($expected, $result);
|
||||||
$expected = str_replace(array("\r\n", "\n"), "", $expected);
|
|
||||||
$this->assertEquals($expected, $result);
|
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
1 => 'Index one',
|
1 => 'Index one',
|
||||||
|
@ -344,7 +342,7 @@ array(
|
||||||
(int) 5 => 'Index five'
|
(int) 5 => 'Index five'
|
||||||
)
|
)
|
||||||
TEXT;
|
TEXT;
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertTextEquals($expected, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -404,9 +402,7 @@ TEXT;
|
||||||
)
|
)
|
||||||
)</pre>
|
)</pre>
|
||||||
TEXT;
|
TEXT;
|
||||||
$result = str_replace(array("\r\n", "\n"), "", $result);
|
$this->assertTextEquals($expected, $result);
|
||||||
$expected = str_replace(array("\r\n", "\n"), "", $expected);
|
|
||||||
$this->assertEquals($expected, $result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -367,7 +367,7 @@ text
|
||||||
HTML;
|
HTML;
|
||||||
$expected = "text\n\ntext";
|
$expected = "text\n\ntext";
|
||||||
$result = Sanitize::stripScripts($string);
|
$result = Sanitize::stripScripts($string);
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertTextEquals($expected, $result);
|
||||||
|
|
||||||
$string = <<<HTML
|
$string = <<<HTML
|
||||||
text
|
text
|
||||||
|
@ -380,7 +380,7 @@ text
|
||||||
HTML;
|
HTML;
|
||||||
$expected = "text\n\ntext";
|
$expected = "text\n\ntext";
|
||||||
$result = Sanitize::stripScripts($string);
|
$result = Sanitize::stripScripts($string);
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertTextEquals($expected, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -315,7 +315,7 @@ This is the song that never ends.
|
||||||
This is the song that never ends.
|
This is the song that never ends.
|
||||||
This is the song that never ends.
|
This is the song that never ends.
|
||||||
TEXT;
|
TEXT;
|
||||||
$this->assertEquals($expected, $result, 'Text not wrapped.');
|
$this->assertTextEquals($expected, $result, 'Text not wrapped.');
|
||||||
|
|
||||||
$result = String::wrap($text, array('width' => 20, 'wordWrap' => false));
|
$result = String::wrap($text, array('width' => 20, 'wordWrap' => false));
|
||||||
$expected = <<<TEXT
|
$expected = <<<TEXT
|
||||||
|
@ -326,7 +326,7 @@ ever ends. This is
|
||||||
the song that never
|
the song that never
|
||||||
ends.
|
ends.
|
||||||
TEXT;
|
TEXT;
|
||||||
$this->assertEquals($expected, $result, 'Text not wrapped.');
|
$this->assertTextEquals($expected, $result, 'Text not wrapped.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -342,5 +342,6 @@ This is the song that never ends.
|
||||||
This is the song that never ends.
|
This is the song that never ends.
|
||||||
This is the song that never ends.
|
This is the song that never ends.
|
||||||
TEXT;
|
TEXT;
|
||||||
|
$this->assertTextEquals($expected, $result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue