Slides from the talk at http://www.meetup.com/GTA-PHP-User-Group-Toronto/events/151672182/
Source code for the demo at https://github.com/zymsys/Slim-RedBeanPHP-KnockoutJS
15. Slim is Testable!
•
Create your own App class
•
Create an invoke method:
public function invoke() {
$this->middleware[0]->call();
$this->response()->finalize();
return $this->response();
}
16. RedBeanPHP is
almost Testable!
•
Use in-memory sqlite:
public function setUp()
{
R::setup('sqlite::memory:');
require('seed.php');
}
public function tearDown()
{
R::close();
}
17. Thanks Y’All!
•
Demo source available at:
https://github.com/zymsys/Slim-RedBeanPHP-KnockoutJS
•
I rarely tweet @v_metcalfe
•
I even more rarely blog:
http://blog.vicmetcalfe.com/