|
@@ 1707-1730 (lines=24) @@
|
| 1704 |
|
} |
| 1705 |
|
} |
| 1706 |
|
|
| 1707 |
|
public function test_user_roundtrip_as_superadmin() |
| 1708 |
|
{ |
| 1709 |
|
wp_set_current_user(self::$superadmin); |
| 1710 |
|
$this->assertTrue(current_user_can('unfiltered_html')); |
| 1711 |
|
$valid_username = is_multisite() ? 'noinvalidcharshere' : 'no-invalid-chars-here'; |
| 1712 |
|
$this->verify_user_roundtrip( |
| 1713 |
|
array( |
| 1714 |
|
'username' => $valid_username, |
| 1715 |
|
'name' => '\\\&\\\ & &invalid; < < &lt;', |
| 1716 |
|
'first_name' => '\\\&\\\ & &invalid; < < &lt;', |
| 1717 |
|
'last_name' => '\\\&\\\ & &invalid; < < &lt;', |
| 1718 |
|
'url' => '\\\&\\\ & &invalid; < < &lt;', |
| 1719 |
|
'description' => '\\\&\\\ & &invalid; < < &lt;', |
| 1720 |
|
'nickname' => '\\\&\\\ & &invalid; < < &lt;', |
| 1721 |
|
'password' => '& & &invalid; < < &lt;', |
| 1722 |
|
), array( |
| 1723 |
|
'username' => $valid_username, |
| 1724 |
|
'name' => '\\\&\\\ & &invalid; < < &lt;', |
| 1725 |
|
'first_name' => '\\\&\\\ & &invalid; < < &lt;', |
| 1726 |
|
'last_name' => '\\\&\\\ & &invalid; < < &lt;', |
| 1727 |
|
'url' => 'http://&%20&%20&invalid;%20%20<%20&lt;', |
| 1728 |
|
'description' => '\\\&\\\ & &invalid; < < &lt;', |
| 1729 |
|
'nickname' => '\\\&\\\ & &invalid; < < &lt;', |
| 1730 |
|
'password' => '& & &invalid; < < &lt;', |
| 1731 |
|
) |
| 1732 |
|
); |
| 1733 |
|
} |
|
@@ 1735-1758 (lines=24) @@
|
| 1732 |
|
); |
| 1733 |
|
} |
| 1734 |
|
|
| 1735 |
|
public function test_user_roundtrip_as_superadmin_html() |
| 1736 |
|
{ |
| 1737 |
|
wp_set_current_user(self::$superadmin); |
| 1738 |
|
$this->assertTrue(current_user_can('unfiltered_html')); |
| 1739 |
|
$valid_username = is_multisite() ? 'noinvalidcharshere' : 'no-invalid-chars-here'; |
| 1740 |
|
$this->verify_user_roundtrip( |
| 1741 |
|
array( |
| 1742 |
|
'username' => $valid_username, |
| 1743 |
|
'name' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>', |
| 1744 |
|
'first_name' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>', |
| 1745 |
|
'last_name' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>', |
| 1746 |
|
'url' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>', |
| 1747 |
|
'description' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>', |
| 1748 |
|
'nickname' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>', |
| 1749 |
|
'password' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>', |
| 1750 |
|
), array( |
| 1751 |
|
'username' => $valid_username, |
| 1752 |
|
'name' => 'div strong', |
| 1753 |
|
'first_name' => 'div strong', |
| 1754 |
|
'last_name' => 'div strong', |
| 1755 |
|
'url' => 'http://divdiv/div%20strongstrong/strong%20scriptoh%20noes/script', |
| 1756 |
|
'description' => 'div <strong>strong</strong> oh noes', |
| 1757 |
|
'nickname' => 'div strong', |
| 1758 |
|
'password' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>', |
| 1759 |
|
) |
| 1760 |
|
); |
| 1761 |
|
} |