Skip to content

xpress-framework/xpress-mvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XPress MVC for WordPress

If you ever wanted to code in a MVC pattern inside WordPress, now you can!

Using this plugin, you can create controllers (with the same syntax of the WP REST API) that process each request and respond it using a normal WordPress template.

Check our example.

Tests

XPress MVC is built from scratch using TDD. Tests are in tests directory. To run them you need to install some requirements and configure the test suite. Follow this instructions:

  1. Install PHPUnit (https://github.com/sebastianbergmann/phpunit#installation).
  2. Install WP-CLI (http://wp-cli.org/#install).
  3. Cd to the plugin's directory.
  4. Install and configure the test environment running bash bin/install-wp-tests.sh wordpress_test root '' localhost latest where root and '' are your local mysql credentials.
  5. Run phpunit to see the tests in action!

Note: Be sure to have svn installed on your system. If anything fails running install-wp-tests.sh you'll have to delete /tmp/wordpress* and drop the wordpress_test database as well before running the command again.