crunchbutton/travis/Tests/RestaurantTest.php
2014-04-07 13:31:15 -07:00

23 lines
419 B
PHP

<?php
class RestaurantTest extends PHPUnit_Framework_TestCase {
public function setUp() {
$r = new Restaurant([
'name' => 'Test Restaurant',
'active' => 1
]);
$r->save();
$this->r = $r->id_restaurant;
}
public function tearDown() {
$r = Restaurant::o($this->r)->delete();
}
public function testLoading() {
$r = Restaurant::o($this->r);
$this->assertEquals('Test Restaurant',$r->name);
}
}