Skip to content

Commit 342af0e

Browse files
committed
Fix tests
1 parent 4760198 commit 342af0e

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

tests/TestCase/Auth/TinyAuthorizeTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,6 @@ public function testIniParsing() {
10561056
// Make protected function available
10571057
$reflection = new ReflectionClass(get_class($object));
10581058
$method = $reflection->getMethod('_parseFiles');
1059-
$method->setAccessible(true);
10601059
$res = $method->invokeArgs($object, [
10611060
[
10621061
Plugin::path('TinyAuth') . 'tests' . DS . 'test_files' . DS,
@@ -1083,7 +1082,6 @@ public function testIniParsingMissingFileException() {
10831082
// Make protected function available
10841083
$reflection = new ReflectionClass(get_class($object));
10851084
$method = $reflection->getMethod('_parseFiles');
1086-
$method->setAccessible(true);
10871085

10881086
$this->expectException(CakeException::class);
10891087

@@ -1103,7 +1101,6 @@ public function testIniConstruct() {
11031101
$object = new TestTinyAuthorize($this->collection);
11041102
$reflection = new ReflectionClass(get_class($object));
11051103
$method = $reflection->getMethod('_constructIniKey');
1106-
$method->setAccessible(true);
11071104

11081105
// Test standard controller
11091106
$params = [
@@ -1160,7 +1157,6 @@ public function testIniDeconstruct() {
11601157
$object = new TestTinyAuthorize($this->collection);
11611158
$reflection = new ReflectionClass(get_class($object));
11621159
$method = $reflection->getMethod('_deconstructIniKey');
1163-
$method->setAccessible(true);
11641160

11651161
// Test standard controller
11661162
$key = 'Tags';
@@ -1260,7 +1256,6 @@ public function testAvailableRoles() {
12601256
// Make protected function available
12611257
$reflection = new ReflectionClass(get_class($object));
12621258
$method = $reflection->getMethod('_getAvailableRoles');
1263-
$method->setAccessible(true);
12641259

12651260
// Test against roles array in Configure
12661261
$expected = [
@@ -1299,7 +1294,6 @@ public function testAvailableRolesMissingTableException() {
12991294
// Make protected function available
13001295
$reflection = new ReflectionClass(get_class($object));
13011296
$method = $reflection->getMethod('_getAvailableRoles');
1302-
$method->setAccessible(true);
13031297

13041298
$this->expectException(Exception::class);
13051299

@@ -1321,7 +1315,6 @@ public function testAvailableRolesEmptyTableException() {
13211315
// Make protected function available
13221316
$reflection = new ReflectionClass(get_class($object));
13231317
$method = $reflection->getMethod('_getAvailableRoles');
1324-
$method->setAccessible(true);
13251318

13261319
$this->expectException(Exception::class);
13271320

@@ -1343,7 +1336,6 @@ public function testUserRoles() {
13431336
// Make protected function available
13441337
$reflection = new ReflectionClass(get_class($object));
13451338
$method = $reflection->getMethod('_getUserRoles');
1346-
$method->setAccessible(true);
13471339

13481340
// Single-role: get role id from roleColumn in user table
13491341
$user = ['role_id' => ROLE_USER];
@@ -1381,7 +1373,6 @@ public function testUserRolesCustomPivotTable() {
13811373
// Make protected function available
13821374
$reflection = new ReflectionClass(get_class($object));
13831375
$method = $reflection->getMethod('_getUserRoles');
1384-
$method->setAccessible(true);
13851376

13861377
$user = ['id' => 2];
13871378
$expected = [
@@ -1410,7 +1401,6 @@ public function testIdColumnPivotTable() {
14101401
// Make protected function available
14111402
$reflection = new ReflectionClass(get_class($object));
14121403
$method = $reflection->getMethod('_getUserRoles');
1413-
$method->setAccessible(true);
14141404

14151405
$user = [
14161406
'id' => 1,
@@ -1642,7 +1632,6 @@ public function testUserRolesMissingRoleColumn() {
16421632
// Make protected function available
16431633
$reflection = new ReflectionClass(get_class($object));
16441634
$method = $reflection->getMethod('_getUserRoles');
1645-
$method->setAccessible(true);
16461635

16471636
$this->expectException(Exception::class);
16481637

@@ -1664,7 +1653,6 @@ public function testUserRolesUserWithoutPivotRoles() {
16641653
// Make protected function available
16651654
$reflection = new ReflectionClass(get_class($object));
16661655
$method = $reflection->getMethod('_getUserRoles');
1667-
$method->setAccessible(true);
16681656

16691657
$user = ['id' => 5];
16701658
$result = $method->invokeArgs($object, [$user]);

0 commit comments

Comments
 (0)