Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions PhpRbac/tests/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#Instructions for running Unit Tests.
# Instructions for running Unit Tests.

##Front Matter
## Front Matter

* The Unit Tests should be run using a database specific for Unit Testing. This way your dev/testing/production data will not be affected.
* To run the Unit Tests using the MySQL adapter you will need to have an existing database with the proper tables and default data prior to running the tests.
* If you are running the Unit Tests for the SQLite adapter the database will be created/overwritten for you automatically.

##The Setup
## The Setup

* Create the database and tables
* MySQL
Expand All @@ -17,23 +17,23 @@
* Navigate to 'rbac/PhpRbac/tests/database' and open up 'database.config'. Change the database connection info accordingly
* Navigate to 'rbac/PhpRbac/tests' and open up 'phpunit_mysql.xml'. Change the database connection info accordingly. Don't forget to change the database name in the DNS string (this is for the DBUnit connection, fixture and datasets)

##Run The Unit Tests
## Run The Unit Tests

* You will need to navigate to 'rbac/PhpRbac/tests/' in order to execute the following commands.

###On Linux
### On Linux

**Note:** Make sure you make 'mysql_tests.sh' and 'sqlite_tests.sh' executable

* To run the tests for MySQL: ./mysql_tests.sh
* To run the tests for SQLite: ./sqlite_tests.sh

###On Windows
### On Windows

* To run the tests for MySQL: mysql_tests.bat
* To run the tests for SQLite: sqlite_tests.bat

##Notes
## Notes

* Make sure you alter the 'rbac/PhpRbac/tests/database/database.config' file (see above) before switching between MySQL and SQLite tests.
* We've created scripts for Windows and Linux (any OS that has sh/bash available). All scripts will:
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#PHP-RBAC v2.x
# PHP-RBAC v2.x

PHP-RBAC is an authorization library for PHP. It provides developers with NIST Level 2 Hierarchical Role Based Access Control and more, in the fastest implementation yet.

**Current Stable Release:** [PHP-RBAC v2.0](https://sourceforge.net/projects/phprbac/files/latest/download?source=dlp)

##Connect With Us
## Connect With Us

* Home Page: [http://phprbac.net/](http://phprbac.net/)
* OWASP Project Page: [https://www.owasp.org/index.php/Phprbac](https://www.owasp.org/index.php/Phprbac)
Expand All @@ -14,41 +14,41 @@ PHP-RBAC is an authorization library for PHP. It provides developers with NIST L
* Issue Tracker: [https://github.com/OWASP/rbac/issues?state=open](https://github.com/OWASP/rbac/issues?state=open)
* Mailing List: [https://lists.owasp.org/mailman/listinfo/owasp_phprbac](https://lists.owasp.org/mailman/listinfo/owasp_phprbac)

##What is an Rbac System?
## What is an Rbac System?

Take a look at the "[Before You Begin](http://phprbac.net/docs_before_you_begin.php)" section of our [Documentation](http://phprbac.net/docs_contents.php) to learn what an RBAC system is and what PHP-RBAC has to offer you and your project.

##NIST Level 2 Compliance
## NIST Level 2 Compliance

For information regarding NIST RBAC Levels, please see [This Paper](http://csrc.nist.gov/rbac/sandhu-ferraiolo-kuhn-00.pdf).

For more great resources see the [NIST RBAC Group Page](http://csrc.nist.gov/groups/SNS/rbac/).

##Installation
## Installation

You can now use [Composer](https://getcomposer.org/) to install the PHP-RBAC code base.

For Installation Instructions please refer to the "[Getting Started](http://phprbac.net/docs_getting_started.php)" section of our [Documentation](http://phprbac.net/docs_contents.php).

##Usage##
## Usage

**Instantiating a PHP-RBAC Object**

With a 'use' statement:

use PhpRbac;

$rbac = new Rbac();

Without a 'use' statement, outside of a namespace:

$rbac = new PhpRbac\Rbac();

Without a 'use' statement, inside of another namespace (notice the leading backslash):

$rbac = new \PhpRbac\Rbac();

##PHP-RBAC and PSR
## PHP-RBAC and PSR

PHP-RBAC's Public API is now fully PSR-0, PSR-1 and PSR-2 compliant.

Expand All @@ -60,7 +60,7 @@ You can now:

**If you notice any conflicts with PSR compliance please [Submit an Issue](https://github.com/OWASP/rbac/issues/new).**

##The future of PHP-RBAC
## The future of PHP-RBAC

We are in the process of refactoring the PHP-RBAC internals. We have two goals in mind while doing this:

Expand All @@ -71,13 +71,13 @@ With a PSR compliant Public API already in place we can continue to work towards
time without altering the Public API that developers are working with and rely on, making the transition as seamless
and invisible as possible.

##Contributing##
## Contributing

We welcome all contributions that will help make PHP-RBAC even better tomorrow than it is today!

Please visit the [PHP-RBAC Wiki](https://github.com/OWASP/rbac/wiki) to learn about our development process and workflow.

###How You Can Help
### How You Can Help

* Report Bugs, Enhancement Requests or Documentation errors using our [Issue Tracker](https://github.com/OWASP/rbac/issues?state=open)
* [Choose a Bug](https://github.com/OWASP/rbac/issues?state=open) to work on and submit a Pull Request
Expand Down