Skip to content

Instantly share code, notes, and snippets.

@dataich
Created February 13, 2019 11:42
Show Gist options
  • Save dataich/c4a00b6ef497071a3eb0096584471a5e to your computer and use it in GitHub Desktop.
Save dataich/c4a00b6ef497071a3eb0096584471a5e to your computer and use it in GitHub Desktop.
<?php
spl_autoload_register(function ($className) {
include "$className.php";
});
class EntryTest extends PHPUnit_Framework_TestCase {
public function testStatus() {
$entry = new Entry();
$this->assertEquals(Entry::STATUS_DRAFT, $entry->status);
$entry->publish();
$this->assertEquals(Entry::STATUS_PUBLISHED, $entry->status);
$entry->delete();
$this->assertEquals(Entry::STATUS_DELETED, $entry->status);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment