diff options
Diffstat (limited to 'tests/Misc')
-rw-r--r-- | tests/Misc/BugsTest.php | 25 | ||||
-rw-r--r-- | tests/Misc/ParameterTest.php | 11 | ||||
-rw-r--r-- | tests/Misc/UtfStringTest.php | 38 |
3 files changed, 37 insertions, 37 deletions
diff --git a/tests/Misc/BugsTest.php b/tests/Misc/BugsTest.php index d356b57..a467869 100644 --- a/tests/Misc/BugsTest.php +++ b/tests/Misc/BugsTest.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Tests\Misc; @@ -7,9 +8,9 @@ use PhpMyAdmin\SqlParser\Tests\TestCase; class BugsTest extends TestCase { /** - * @dataProvider bugProvider - * * @param mixed $test + * + * @dataProvider bugProvider */ public function testBug($test) { @@ -18,15 +19,15 @@ class BugsTest extends TestCase public function bugProvider() { - return array( - array('bugs/gh9'), - array('bugs/gh14'), - array('bugs/gh16'), - array('bugs/pma11800'), - array('bugs/pma11836'), - array('bugs/pma11843'), - array('bugs/pma11867'), - array('bugs/pma11879') - ); + return [ + ['bugs/gh9'], + ['bugs/gh14'], + ['bugs/gh16'], + ['bugs/pma11800'], + ['bugs/pma11836'], + ['bugs/pma11843'], + ['bugs/pma11867'], + ['bugs/pma11879'], + ]; } } diff --git a/tests/Misc/ParameterTest.php b/tests/Misc/ParameterTest.php index f2d5280..cfabfb1 100644 --- a/tests/Misc/ParameterTest.php +++ b/tests/Misc/ParameterTest.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Tests\Misc; @@ -7,9 +8,9 @@ use PhpMyAdmin\SqlParser\Tests\TestCase; class ParameterTest extends TestCase { /** - * @dataProvider parameterProvider - * * @param mixed $test + * + * @dataProvider parameterProvider */ public function testParameter($test) { @@ -18,8 +19,8 @@ class ParameterTest extends TestCase public function parameterProvider() { - return array( - array('misc/parseParameter') - ); + return [ + ['misc/parseParameter'], + ]; } } diff --git a/tests/Misc/UtfStringTest.php b/tests/Misc/UtfStringTest.php index 36f0298..965812f 100644 --- a/tests/Misc/UtfStringTest.php +++ b/tests/Misc/UtfStringTest.php @@ -1,9 +1,11 @@ <?php +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Tests\Misc; use PhpMyAdmin\SqlParser\Tests\TestCase; use PhpMyAdmin\SqlParser\UtfString; +use Throwable; class UtfStringTest extends TestCase { @@ -36,22 +38,18 @@ class UtfStringTest extends TestCase $this->assertNull($str[static::TEST_PHRASE_LEN]); } - /** - * @expectedException \Exception - * @expectedExceptionMessage Not implemented. - */ public function testSet() { + $this->expectExceptionMessage('Not implemented.'); + $this->expectException(Throwable::class); $str = new UtfString(''); $str[0] = 'a'; } - /** - * @expectedException \Exception - * @expectedExceptionMessage Not implemented. - */ public function testUnset() { + $this->expectExceptionMessage('Not implemented.'); + $this->expectException(Throwable::class); $str = new UtfString(''); unset($str[0]); } @@ -86,11 +84,11 @@ class UtfStringTest extends TestCase /** * Test access to string. * - * @dataProvider utf8Strings - * * @param mixed $text * @param mixed $pos10 * @param mixed $pos20 + * + * @dataProvider utf8Strings */ public function testAccess($text, $pos10, $pos20) { @@ -102,27 +100,27 @@ class UtfStringTest extends TestCase public function utf8Strings() { - return array( - 'ascii' => array( + return [ + 'ascii' => [ 'abcdefghijklmnopqrstuvwxyz', 'k', 'u', - ), - 'unicode' => array( + ], + 'unicode' => [ 'áéíóúýěřťǔǐǒǎšďȟǰǩľžčǚň', 'ǐ', 'č', - ), - 'emoji' => array( + ], + 'emoji' => [ '😂😄😃😀😊😉😍😘😚😗😂👿😮😨😱😠😡😤😖😆😋👯', '😂', '😋', - ), - 'iso' => array( + ], + 'iso' => [ "P\xf8\xed\xb9ern\xec \xbelu\xbbou\xe8k\xfd k\xf3d \xfap\xecl \xef\xe1belsk\xe9 k\xf3dy", null, null, - ) - ); + ], + ]; } } |