Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
285a4552
Commit
285a4552
authored
May 18, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed auth manager unit test to not expect generic exception
This is not allowed by phpunit as a test may not fail anymore
parent
946f6552
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
ManagerTestBase.php
tests/unit/framework/rbac/ManagerTestBase.php
+5
-5
Response.php
yii/web/Response.php
+1
-0
No files found.
tests/unit/framework/rbac/ManagerTestBase.php
View file @
285a4552
...
...
@@ -32,7 +32,7 @@ abstract class ManagerTestBase extends TestCase
$this
->
assertEquals
(
$item2
->
type
,
Item
::
TYPE_ROLE
);
// test adding an item with the same name
$this
->
setExpectedException
(
'Exception'
);
$this
->
setExpectedException
(
'
\yii\base\
Exception'
);
$this
->
auth
->
createItem
(
$name
,
$type
,
$description
,
$bizRule
,
$data
);
}
...
...
@@ -69,14 +69,14 @@ abstract class ManagerTestBase extends TestCase
$this
->
auth
->
addItemChild
(
'createPost'
,
'updatePost'
);
// test adding upper level item to lower one
$this
->
setExpectedException
(
'Exception'
);
$this
->
setExpectedException
(
'
\yii\base\
Exception'
);
$this
->
auth
->
addItemChild
(
'readPost'
,
'reader'
);
}
public
function
testAddItemChild2
()
{
// test adding inexistent items
$this
->
setExpectedException
(
'Exception'
);
$this
->
setExpectedException
(
'
\yii\base\
Exception'
);
$this
->
assertFalse
(
$this
->
auth
->
addItemChild
(
'createPost2'
,
'updatePost'
));
}
...
...
@@ -105,7 +105,7 @@ abstract class ManagerTestBase extends TestCase
$this
->
assertEquals
(
$auth
->
bizRule
,
'rule'
);
$this
->
assertEquals
(
$auth
->
data
,
'data'
);
$this
->
setExpectedException
(
'Exception'
);
$this
->
setExpectedException
(
'
\yii\base\
Exception'
);
$this
->
auth
->
assign
(
'new user'
,
'createPost2'
,
'rule'
,
'data'
);
}
...
...
@@ -158,7 +158,7 @@ abstract class ManagerTestBase extends TestCase
public
function
testDetectLoop
()
{
$this
->
setExpectedException
(
'Exception'
);
$this
->
setExpectedException
(
'
\yii\base\
Exception'
);
$this
->
auth
->
addItemChild
(
'readPost'
,
'readPost'
);
}
...
...
yii/web/Response.php
View file @
285a4552
...
...
@@ -15,6 +15,7 @@ use yii\helpers\StringHelper;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Carsten Brandt <mail@cebe.cc>
* @since 2.0
*/
class
Response
extends
\yii\base\Response
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment