diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php b/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php index 49dbb316..e5eafab1 100644 --- a/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php +++ b/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php | |||
@@ -11,23 +11,23 @@ class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase | |||
11 | { | 11 | { |
12 | public function dataForPrefix() | 12 | public function dataForPrefix() |
13 | { | 13 | { |
14 | return array( | 14 | return [ |
15 | array('wallabag_', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'wallabag_user', '"wallabag_user"', new \Doctrine\DBAL\Platforms\PostgreSqlPlatform()), | 15 | ['wallabag_', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'wallabag_user', '"wallabag_user"', new \Doctrine\DBAL\Platforms\PostgreSqlPlatform()], |
16 | array('wallabag_', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'wallabag_user', '`wallabag_user`', new \Doctrine\DBAL\Platforms\MySqlPlatform()), | 16 | ['wallabag_', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'wallabag_user', '`wallabag_user`', new \Doctrine\DBAL\Platforms\MySqlPlatform()], |
17 | array('wallabag_', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'wallabag_user', '"wallabag_user"', new \Doctrine\DBAL\Platforms\SqlitePlatform()), | 17 | ['wallabag_', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'wallabag_user', '"wallabag_user"', new \Doctrine\DBAL\Platforms\SqlitePlatform()], |
18 | 18 | ||
19 | array('wallabag_', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'wallabag_user', 'wallabag_user', new \Doctrine\DBAL\Platforms\PostgreSqlPlatform()), | 19 | ['wallabag_', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'wallabag_user', 'wallabag_user', new \Doctrine\DBAL\Platforms\PostgreSqlPlatform()], |
20 | array('wallabag_', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'wallabag_user', 'wallabag_user', new \Doctrine\DBAL\Platforms\MySqlPlatform()), | 20 | ['wallabag_', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'wallabag_user', 'wallabag_user', new \Doctrine\DBAL\Platforms\MySqlPlatform()], |
21 | array('wallabag_', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'wallabag_user', 'wallabag_user', new \Doctrine\DBAL\Platforms\SqlitePlatform()), | 21 | ['wallabag_', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'wallabag_user', 'wallabag_user', new \Doctrine\DBAL\Platforms\SqlitePlatform()], |
22 | 22 | ||
23 | array('', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'user', '"user"', new \Doctrine\DBAL\Platforms\PostgreSqlPlatform()), | 23 | ['', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'user', '"user"', new \Doctrine\DBAL\Platforms\PostgreSqlPlatform()], |
24 | array('', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'user', '`user`', new \Doctrine\DBAL\Platforms\MySqlPlatform()), | 24 | ['', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'user', '`user`', new \Doctrine\DBAL\Platforms\MySqlPlatform()], |
25 | array('', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'user', '"user"', new \Doctrine\DBAL\Platforms\SqlitePlatform()), | 25 | ['', 'Wallabag\UserBundle\Entity\User', '`user`', 'user', 'user', '"user"', new \Doctrine\DBAL\Platforms\SqlitePlatform()], |
26 | 26 | ||
27 | array('', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'user', 'user', new \Doctrine\DBAL\Platforms\PostgreSqlPlatform()), | 27 | ['', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'user', 'user', new \Doctrine\DBAL\Platforms\PostgreSqlPlatform()], |
28 | array('', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'user', 'user', new \Doctrine\DBAL\Platforms\MySqlPlatform()), | 28 | ['', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'user', 'user', new \Doctrine\DBAL\Platforms\MySqlPlatform()], |
29 | array('', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'user', 'user', new \Doctrine\DBAL\Platforms\SqlitePlatform()), | 29 | ['', 'Wallabag\UserBundle\Entity\User', 'user', 'user', 'user', 'user', new \Doctrine\DBAL\Platforms\SqlitePlatform()], |
30 | ); | 30 | ]; |
31 | } | 31 | } |
32 | 32 | ||
33 | /** | 33 | /** |
@@ -42,7 +42,7 @@ class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase | |||
42 | $subscriber = new TablePrefixSubscriber($prefix); | 42 | $subscriber = new TablePrefixSubscriber($prefix); |
43 | 43 | ||
44 | $metaClass = new ClassMetadata($entityName); | 44 | $metaClass = new ClassMetadata($entityName); |
45 | $metaClass->setPrimaryTable(array('name' => $tableName)); | 45 | $metaClass->setPrimaryTable(['name' => $tableName]); |
46 | 46 | ||
47 | $metaDataEvent = new LoadClassMetadataEventArgs($metaClass, $em); | 47 | $metaDataEvent = new LoadClassMetadataEventArgs($metaClass, $em); |
48 | 48 | ||
@@ -64,7 +64,7 @@ class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase | |||
64 | ->getMock(); | 64 | ->getMock(); |
65 | 65 | ||
66 | $metaClass = new ClassMetadata($entityName); | 66 | $metaClass = new ClassMetadata($entityName); |
67 | $metaClass->setPrimaryTable(array('name' => $tableName)); | 67 | $metaClass->setPrimaryTable(['name' => $tableName]); |
68 | 68 | ||
69 | $metaDataEvent = new LoadClassMetadataEventArgs($metaClass, $em); | 69 | $metaDataEvent = new LoadClassMetadataEventArgs($metaClass, $em); |
70 | 70 | ||
@@ -88,18 +88,18 @@ class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase | |||
88 | $subscriber = new TablePrefixSubscriber('yo_'); | 88 | $subscriber = new TablePrefixSubscriber('yo_'); |
89 | 89 | ||
90 | $metaClass = new ClassMetadata('Wallabag\UserBundle\Entity\Entry'); | 90 | $metaClass = new ClassMetadata('Wallabag\UserBundle\Entity\Entry'); |
91 | $metaClass->setPrimaryTable(array('name' => 'entry')); | 91 | $metaClass->setPrimaryTable(['name' => 'entry']); |
92 | $metaClass->mapManyToMany(array( | 92 | $metaClass->mapManyToMany([ |
93 | 'fieldName' => 'tags', | 93 | 'fieldName' => 'tags', |
94 | 'joinTable' => array('name' => null, 'schema' => null), | 94 | 'joinTable' => ['name' => null, 'schema' => null], |
95 | 'targetEntity' => 'Tag', | 95 | 'targetEntity' => 'Tag', |
96 | 'mappedBy' => null, | 96 | 'mappedBy' => null, |
97 | 'inversedBy' => 'entries', | 97 | 'inversedBy' => 'entries', |
98 | 'cascade' => array('persist'), | 98 | 'cascade' => ['persist'], |
99 | 'indexBy' => null, | 99 | 'indexBy' => null, |
100 | 'orphanRemoval' => false, | 100 | 'orphanRemoval' => false, |
101 | 'fetch' => 2, | 101 | 'fetch' => 2, |
102 | )); | 102 | ]); |
103 | 103 | ||
104 | $metaDataEvent = new LoadClassMetadataEventArgs($metaClass, $em); | 104 | $metaDataEvent = new LoadClassMetadataEventArgs($metaClass, $em); |
105 | 105 | ||